protected void chkDynamic_CheckedChanged(object sender, EventArgs e) { MessageCollection validationErrors = new MessageCollection(); IabolMgmtSIOBO abolMgmt = new IabolMgmtSIOBO(); UserBO user = (UserBO)Session["CurrentUser"]; Message Msg = new Message(); Msg.Text = ""; foreach (GridViewRow gr in gvMain.Rows) { CheckBox chkSel = (CheckBox)gr.FindControl("chkSel"); DropDownList ddlService = (DropDownList)gr.FindControl("ddlService"); if (chkSel != null && ddlService != null) { if (chkSel.Checked == true) { if (ddlService.SelectedItem.Value == "" || ddlService.SelectedItem.Value==null) { Msg.Text = "Select Service From DropDown First"; validationErrors.Add(Msg); Master.ErrorMessages.Messages = validationErrors; return; } else { abolMgmt.AssignCustomRates(CurrentUser.LoginName, CurrentUser.Password, "237", int.Parse(ddlService.SelectedItem.Value), int.Parse(gvMain.DataKeys[gr.RowIndex].Value.ToString())); } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)