protected void btnVerify_Click(object sender, EventArgs e) { foreach (GridViewRow gr in gvAllotments.Rows) { int Vessel_ID = 0; HiddenField hdnAllotmentID = (HiddenField)gr.FindControl("hdnAllotmentID"); HiddenField hdnVessel_ID = (HiddenField)gr.FindControl("hdnVessel_ID"); if (hdnVessel_ID != null) { Vessel_ID = UDFLib.ConvertToInteger(hdnVessel_ID.Value); } CheckBox chkSelect = (CheckBox)gr.FindControl("chkSelect"); if (chkSelect != null && chkSelect.Checked == true) { int AllotmentID = int.Parse(hdnAllotmentID.Value); BLL_PB_PortageBill.Verify_Allotment(Vessel_ID, AllotmentID, GetSessionUserID()); } } int CurrentPage = gvAllotments.PageIndex; Load_Allotments(); gvAllotments.PageIndex = CurrentPage; }
protected void btnVerifyAllot_Click(object s, EventArgs e) { try { if (BLL_PB_PortageBill.Get_Bank_Account_Status(int.Parse(((Button)s).CommandArgument.Split(',')[1]), int.Parse(((Button)s).CommandArgument.Split(',')[0])) != 0) { BLL_PB_PortageBill.Verify_Allotment(int.Parse(((Button)s).CommandArgument.Split(',')[0]), int.Parse(((Button)s).CommandArgument.Split(',')[1]), GetSessionUserID()); } else { String msg1 = String.Format("alert('This seems to be manning office account.Please Select Crew Bank Account for Allotment.');");//You cannot verify this. To verify this, ask the staff to change the bank account or contact to IT Administrator. ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgshobannk", msg1, true); } CrewID = int.Parse(((Button)s).CommandArgument.Split(',')[2]); AllotmentID = int.Parse(((Button)s).CommandArgument.Split(',')[1]); BindAllotmentsToVerify(null); } catch (Exception ex) { throw ex; } }