protected void btnSave_Click(object sender, EventArgs e) { string city = string.Empty; string state = string.Empty; string pincode = string.Empty; string mobileno = string.Empty; string occupation = string.Empty; string accounttype = string.Empty; string bankname = string.Empty; string personalstatus = string.Empty; bool blResult = false; int Id = 0; int tableNo = 0; string clientCode = string.Empty; string address1 = string.Empty; string address2 = string.Empty; string address3 = string.Empty; string country = string.Empty; string officePhoneNo = string.Empty; string officeExtensionNo = string.Empty; string officeFaxNo = string.Empty; string homePhoneNo = string.Empty; string homeFaxNo = string.Empty; string annualIncome = string.Empty; string pan1 = string.Empty; string pan2 = string.Empty; string pan3 = string.Empty; string emailId = string.Empty; string transactionType = string.Empty; string transactionNature = string.Empty; string transactionHead = string.Empty; string transactionDescription = string.Empty; string productCode = string.Empty; string accountNo = string.Empty; //string guardianDOB = string.Empty; uploadCommonBo = new UploadCommonBo(); GridFooterItem footerRow = (GridFooterItem)gvProfileIncreamenetReject.MasterTableView.GetItems(GridItemType.Footer)[0]; foreach (GridDataItem dr in gvProfileIncreamenetReject.Items) { if (((TextBox)footerRow.FindControl("txtClientCodeFooter")).Text.Trim() == "") { clientCode = ((TextBox)dr.FindControl("txtClientCode")).Text; } else { clientCode = ((TextBox)footerRow.FindControl("txtClientCodeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtCityFooter")).Text.Trim() == "") { city = ((TextBox)dr.FindControl("txtCity")).Text; } else { city = ((TextBox)footerRow.FindControl("txtCityFooter")).Text; } if (((TextBox)footerRow.FindControl("txtStateFooter")).Text.Trim() == "") { state = ((TextBox)dr.FindControl("txtState")).Text; } else { state = ((TextBox)footerRow.FindControl("txtStateFooter")).Text; } if (((TextBox)footerRow.FindControl("txtPinCodeFooter")).Text.Trim() == "") { pincode = ((TextBox)dr.FindControl("txtPinCode")).Text; } else { pincode = ((TextBox)footerRow.FindControl("txtPinCodeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtMobileNoFooter")).Text.Trim() == "") { mobileno = ((TextBox)dr.FindControl("txtMobileNo")).Text; } else { mobileno = ((TextBox)footerRow.FindControl("txtMobileNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtOccupationFooter")).Text.Trim() == "") { occupation = ((TextBox)dr.FindControl("txtOccupation")).Text; } else { occupation = ((TextBox)footerRow.FindControl("txtOccupationFooter")).Text; } if (((TextBox)footerRow.FindControl("txtAccountTypeFooter")).Text.Trim() == "") { accounttype = ((TextBox)dr.FindControl("txtAccountType")).Text; } else { accounttype = ((TextBox)footerRow.FindControl("txtAccountTypeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtBankNameFooter")).Text.Trim() == "") { bankname = ((TextBox)dr.FindControl("txtBankName")).Text; } else { bankname = ((TextBox)footerRow.FindControl("txtBankNameFooter")).Text; } if (((TextBox)footerRow.FindControl("txtPersonalStatusFooter")).Text.Trim() == "") { personalstatus = ((TextBox)dr.FindControl("txtPersonalStatus")).Text; } else { personalstatus = ((TextBox)footerRow.FindControl("txtPersonalStatusFooter")).Text; } if (((TextBox)footerRow.FindControl("txtAddress1Footer")).Text.Trim() == "") { address1 = ((TextBox)dr.FindControl("txtAddress1")).Text; } else { address1 = ((TextBox)footerRow.FindControl("txtAddress1Footer")).Text; } if (((TextBox)footerRow.FindControl("txtAddress2Footer")).Text.Trim() == "") { address2 = ((TextBox)dr.FindControl("txtAddress2")).Text; } else { address2 = ((TextBox)footerRow.FindControl("txtAddress2Footer")).Text; } if (((TextBox)footerRow.FindControl("txtAddress3Footer")).Text.Trim() == "") { address3 = ((TextBox)dr.FindControl("txtAddress3")).Text; } else { address3 = ((TextBox)footerRow.FindControl("txtAddress3Footer")).Text; } if (((TextBox)footerRow.FindControl("txtCountryFooter")).Text.Trim() == "") { country = ((TextBox)dr.FindControl("txtCountry")).Text; } else { country = ((TextBox)footerRow.FindControl("txtCountryFooter")).Text; } if (((TextBox)footerRow.FindControl("txtOfficePhoneNoFooter")).Text.Trim() == "") { officePhoneNo = ((TextBox)dr.FindControl("txtOfficePhoneNo")).Text; } else { officePhoneNo = ((TextBox)footerRow.FindControl("txtOfficePhoneNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtOfficeExtensionNoFooter")).Text.Trim() == "") { officeExtensionNo = ((TextBox)dr.FindControl("txtOfficeExtensionNo")).Text; } else { officeExtensionNo = ((TextBox)footerRow.FindControl("txtOfficeExtensionNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtOfficeFaxNoFooter")).Text.Trim() == "") { officeFaxNo = ((TextBox)dr.FindControl("txtOfficeFaxNo")).Text; } else { officeFaxNo = ((TextBox)footerRow.FindControl("txtOfficeFaxNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtHomePhoneNoFooter")).Text.Trim() == "") { homePhoneNo = ((TextBox)dr.FindControl("txtHomePhoneNo")).Text; } else { homePhoneNo = ((TextBox)footerRow.FindControl("txtHomePhoneNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtHomeFaxNoFooter")).Text.Trim() == "") { homeFaxNo = ((TextBox)dr.FindControl("txtHomeFaxNo")).Text; } else { homeFaxNo = ((TextBox)footerRow.FindControl("txtHomeFaxNoFooter")).Text; } if (((TextBox)footerRow.FindControl("txtAnnualIncomeFooter")).Text.Trim() == "") { annualIncome = ((TextBox)dr.FindControl("txtAnnualIncome")).Text; } else { annualIncome = ((TextBox)footerRow.FindControl("txtAnnualIncomeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtPANNO1Footer")).Text.Trim() == "") { pan1 = ((TextBox)dr.FindControl("txtPANNO1")).Text; } else { pan1 = ((TextBox)footerRow.FindControl("txtPANNO1Footer")).Text; } if (((TextBox)footerRow.FindControl("txtPANNO2Footer")).Text.Trim() == "") { pan2 = ((TextBox)dr.FindControl("txtPANNO2")).Text; } else { pan2 = ((TextBox)footerRow.FindControl("txtPANNO2Footer")).Text; } if (((TextBox)footerRow.FindControl("txtPANNO3Footer")).Text.Trim() == "") { pan3 = ((TextBox)dr.FindControl("txtPANNO3")).Text; } else { pan3 = ((TextBox)footerRow.FindControl("txtPANNO3Footer")).Text; } if (((TextBox)footerRow.FindControl("txtEmailIdFooter")).Text.Trim() == "") { emailId = ((TextBox)dr.FindControl("txtEmailId")).Text; } else { emailId = ((TextBox)footerRow.FindControl("txtEmailIdFooter")).Text; } if (((TextBox)footerRow.FindControl("txtTransactionTypeFooter")).Text.Trim() == "") { transactionType = ((TextBox)dr.FindControl("txtTransactionType")).Text; } else { transactionType = ((TextBox)footerRow.FindControl("txtTransactionTypeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtTransactionNatureFooter")).Text.Trim() == "") { transactionNature = ((TextBox)dr.FindControl("txtTransactionNature")).Text; } else { transactionNature = ((TextBox)footerRow.FindControl("txtTransactionNatureFooter")).Text; } if (((TextBox)footerRow.FindControl("txtTransactionHeadFooter")).Text.Trim() == "") { transactionHead = ((TextBox)dr.FindControl("txtTransactionHead")).Text; } else { transactionHead = ((TextBox)footerRow.FindControl("txtTransactionHeadFooter")).Text; } if (((TextBox)footerRow.FindControl("txtTransactionDescriptionFooter")).Text.Trim() == "") { transactionDescription = ((TextBox)dr.FindControl("txtTransactionDescription")).Text; } else { transactionDescription = ((TextBox)footerRow.FindControl("txtTransactionDescriptionFooter")).Text; } if (((TextBox)footerRow.FindControl("txtProductCodeFooter")).Text.Trim() == "") { productCode = ((TextBox)dr.FindControl("txtProductCode")).Text; } else { productCode = ((TextBox)footerRow.FindControl("txtProductCodeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtAccountNoFooter")).Text.Trim() == "") { accountNo = ((TextBox)dr.FindControl("txtAccountNo")).Text; } else { accountNo = ((TextBox)footerRow.FindControl("txtAccountNoFooter")).Text; } CheckBox checkBox = (CheckBox)dr.FindControl("chkId"); if (checkBox.Checked == true) { int selectedRow = 0; GridDataItem gdi; gdi = (GridDataItem)checkBox.NamingContainer; selectedRow = gdi.ItemIndex + 1; Id = int.Parse((gvProfileIncreamenetReject.MasterTableView.DataKeyValues[selectedRow - 1]["ID"].ToString())); tableNo = int.Parse((gvProfileIncreamenetReject.MasterTableView.DataKeyValues[selectedRow - 1]["TableNo"].ToString())); blResult = uploadCommonBo.UpdateRequestRejects(clientCode, Id, tableNo, city, state, pincode, mobileno, occupation, accounttype, bankname, personalstatus, address1, address2, address3, country, officePhoneNo, officeExtensionNo, officeFaxNo, homePhoneNo, homeFaxNo, annualIncome, pan1, pan2, pan3, emailId, transactionType, transactionNature, transactionHead, transactionDescription, productCode, accountNo); } } if (Request.QueryString["ReqId"] != null) { DataTable dtRequests = new DataTable(); DataSet dtProcessLogDetails = new DataSet(); reqId = Int32.Parse(Request.QueryString["ReqId"].ToString()); GetProfileIncreamentRejection(reqId); dtRequests = (DataTable)Cache["RequestReject" + userVo.UserId.ToString()]; { if (ViewState["RejectReason"] != null) { rcbType = ViewState["RejectReason"].ToString(); } if (!string.IsNullOrEmpty(rcbType)) { DataView dvStaffList = new DataView(dtRequests, "RejectedReasonDescription = '" + rcbType + "'", "", DataViewRowState.CurrentRows); gvProfileIncreamenetReject.DataSource = dvStaffList.ToTable(); GridColumn column = gvProfileIncreamenetReject.MasterTableView.GetColumnSafe("RejectedReasonDescription"); column.CurrentFilterFunction = GridKnownFunction.Contains; gvProfileIncreamenetReject.MasterTableView.Rebind(); } else { GetProfileIncreamentRejection(reqId); } } } }