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