protected void btnSave_Click(object sender, EventArgs e) { string newScheme = string.Empty; string PanNum = string.Empty; string TransactionType = string.Empty; string FolioNumber = string.Empty; double Price = 0; double Units = 0; double Amount = 0; int UserTransactionNo = 0; int CMFTSId = 0; bool blResult = false; rejectedRecordsBo = new RejectedRecordsBo(); GridFooterItem footerRow = (GridFooterItem)gvWERPTrans.MasterTableView.GetItems(GridItemType.Footer)[0]; foreach (GridDataItem dr in gvWERPTrans.Items) { if (((TextBox)footerRow.FindControl("txtSchemeFooter")).Text.Trim() == "") { newScheme = ((TextBox)dr.FindControl("txtScheme")).Text; } else { newScheme = ((TextBox)footerRow.FindControl("txtSchemeFooter")).Text; } if (((TextBox)footerRow.FindControl("txtPanFooter")).Text.Trim() == "") { PanNum = ((TextBox)dr.FindControl("txtPanNum")).Text; } else { PanNum = ((TextBox)footerRow.FindControl("txtPanFooter")).Text; } if (((TextBox)footerRow.FindControl("txtTransactionFooter")).Text.Trim() == "") { TransactionType = ((TextBox)dr.FindControl("txtTransaction")).Text; } else { TransactionType = ((TextBox)footerRow.FindControl("txtTransactionFooter")).Text; } if (((TextBox)footerRow.FindControl("txtFolioNumberFooter")).Text.Trim() == "") { FolioNumber = ((TextBox)dr.FindControl("txtFolioNumber")).Text; } else { FolioNumber = ((TextBox)footerRow.FindControl("txtFolioNumberFooter")).Text; } if (((TextBox)footerRow.FindControl("txtPriceFooter")).Text.Trim() == "") { Price = Convert.ToDouble(((TextBox)dr.FindControl("txtPrice")).Text); } else { Price = Convert.ToDouble(((TextBox)footerRow.FindControl("txtPriceFooter")).Text); } if (((TextBox)footerRow.FindControl("txtUnitsFooter")).Text.Trim() == "") { Units = Convert.ToDouble(((TextBox)dr.FindControl("txtUnits")).Text); } else { Units = Convert.ToDouble(((TextBox)footerRow.FindControl("txtUnitsFooter")).Text); } if (((TextBox)footerRow.FindControl("txtAmountFooter")).Text.Trim() == "") { Amount = Convert.ToDouble(((TextBox)dr.FindControl("txtAmount")).Text); } else { Amount = Convert.ToDouble(((TextBox)footerRow.FindControl("txtAmountFooter")).Text); } if (((TextBox)footerRow.FindControl("txtUsertransactionFooter")).Text.Trim() == "") { UserTransactionNo = Convert.ToInt32(((TextBox)dr.FindControl("txtUsertransaction")).Text); } else { UserTransactionNo = Convert.ToInt32(((TextBox)footerRow.FindControl("txtUsertransactionFooter")).Text); } CheckBox checkBox = (CheckBox)dr.FindControl("chkId"); if (checkBox.Checked) { int selectedRow = 0; GridDataItem gdi; gdi = (GridDataItem)checkBox.NamingContainer; selectedRow = gdi.ItemIndex + 1; CMFTSId = int.Parse((gvWERPTrans.MasterTableView.DataKeyValues[selectedRow - 1]["CMFTSId"].ToString())); blResult = rejectedRecordsBo.UpdateMFTrasactionStaging(CMFTSId, PanNum, newScheme, TransactionType, FolioNumber, Price, Units, Amount, UserTransactionNo); } } if (blResult) { // Success Message } else { // Failure Message } // BindGrid if (Request.QueryString["processId"] != null) { ProcessId = Int32.Parse(Request.QueryString["processId"].ToString()); } if (Request.QueryString["filetypeid"] != null) { filetypeId = Int32.Parse(Request.QueryString["filetypeid"].ToString()); } //BindGrid(ProcessId); BindEquityTransactionGrid(ProcessId); }