protected void Page_Load(object sender, EventArgs e) { // UserAccessValidation(); if (!string.IsNullOrEmpty(Request.QueryString["Vessel_ID"])) { DataTable dtWelfareDetails = BLL_PB_PortageBill.Get_Crew_Welfare_Details(UDFLib.ConvertToInteger(Request.QueryString["Welfare_ID"]), Convert.ToInt32(Request.QueryString["Vessel_ID"]), UDFLib.ConvertDateToNull(Request.QueryString["PB_Date"])); if (dtWelfareDetails.Rows.Count > 0) { lblVessel.Text = dtWelfareDetails.Rows[0]["Vessel_Name"].ToString(); if (!string.IsNullOrEmpty(dtWelfareDetails.Rows[0]["from_date"].ToString())) { lblFrom.Text = UDFLib.ConvertUserDateFormat(Convert.ToDateTime(dtWelfareDetails.Rows[0]["from_date"].ToString()).ToString("dd/MM/yyyy"), UDFLib.GetDateFormat()); } if (!string.IsNullOrEmpty(dtWelfareDetails.Rows[0]["To_date"].ToString())) { lblTo.Text = UDFLib.ConvertUserDateFormat(Convert.ToDateTime(dtWelfareDetails.Rows[0]["To_date"].ToString()).ToString("dd/MM/yyyy"), UDFLib.GetDateFormat()); } lblOpnBL.Text = dtWelfareDetails.Rows[0]["Opening_Bal"].ToString(); lblClosing.Text = dtWelfareDetails.Rows[0]["Closing_Bal"].ToString(); objItemColumn.AddMergedColumns(new int[] { 5, 6 }, "Amount", "HeaderStyle-css"); gvWelfareDetails.DataSource = dtWelfareDetails; gvWelfareDetails.DataBind(); (gvWelfareDetails.FooterRow.FindControl("lblRcvdTotal") as Label).Text = dtWelfareDetails.Rows[0]["Total_Recp_Amount"].ToString(); (gvWelfareDetails.FooterRow.FindControl("lblPaidTotal") as Label).Text = dtWelfareDetails.Rows[0]["Total_Payment_Amount"].ToString(); } } }