protected void btnupdate_Click(object sender, EventArgs e)
        {
            try
            {
                DataUtility data = null;

                if (Page.IsValid)
                {
                    foreach (GridViewRow gvrow in popupgv.Rows)
                    {
                        if (gvrow.RowType == DataControlRowType.DataRow)
                        {
                            //var checkbox = gvrow.FindControl("chkpopup") as CheckBox;
                            CheckBox chkRow = (gvrow.Cells[0].FindControl("chkpopup") as CheckBox);

                            if (chkRow.Checked)
                            {
                                string code = gvrow.Cells[2].Text;


                                SqlParameter[] sqlParam =
                                {
                                    new SqlParameter("@hfservicelinecode", hfservicelinecode.Value),
                                    new SqlParameter("@hfmodulecode",      hfmodulecode.Value),
                                    new SqlParameter("@hfcomplaintcode",   hfcomplaintcode.Value),
                                    new SqlParameter("@Service_Line_Code", ddlservicelinecode.SelectedValue),
                                    new SqlParameter("@Module_Code",       ddlmodulecode.SelectedValue),

                                    new SqlParameter("@complaint_code",    code),

                                    // new SqlParameter("@complaint_code",CheckBoxList1.SelectedValue),
                                    new SqlParameter("@UpdatedBy",         Session["UserName"]),
                                    new SqlParameter("@UpdatedDate",       DateTime.Now)
                                };

                                data = new DataUtility();

                                data.ExecuteProc("updateComplaintMapping", sqlParam);
                            }
                        }
                    }

                    btnupdate.Visible = false;

                    btnsave.Visible = true;

                    ClearData();


                    FillGrid();
                    r_Error1.Visible = true;

                    lblupdate.Text = "Solution Updated";
                    ClientScript.RegisterStartupScript(this.GetType(), "alert", "HideupdateLabel();", true);
                }
                else
                {
                    btnupdate.Visible = true;

                    btnsave.Visible = false;
                }
            }

            catch
            {
                throw;
            }
        }