protected void btnExpToExl_Click(object sender, EventArgs e) { try { DataTable dt = BLL_PB_PortageBill.Get_PerMOAllotments(int.Parse(ddlFleet.SelectedValue) , int.Parse(ddlVessel.SelectedValue) , ddlMonth.SelectedValue , ddlYear.SelectedValue , int.Parse(ddlManningAgent.SelectedValue) , int.Parse(DDLBank.SelectedValue) , CrewID , Convert.ToInt32(ddlCountry.SelectedValue)); decimal iAmount = 0; foreach (DataRow row in dt.Rows) { iAmount = iAmount + UDFLib.ConvertToDecimal(row["Amount"]); } string[] HeaderCaptions = { "Vessel", "Staff Code", "Name", "Rank", "Seaman ID", "Manning Agent", "Account No.", "Beneficiary", "Bank Name", "PBDate", "Amount", "Currency" }; string[] DataColumnsName = { "vessel_short_name", "STAFF_CODE", "Staff_fullName", "Rank_Short_Name", "Seaman_Book_Number", "Company_Name", "BankAccId", "Beneficiary", "Bank_Name", "PBill_Date", "Amount", "Currency" }; GridViewExportUtil.ShowExcel(dt, HeaderCaptions, DataColumnsName, "ReportperManningAgent", "Report-per Manning Agent- Total Amount: " + iAmount.ToString("0.00"), ""); } catch (Exception ex) { } }
private void gvDenominations_BindData() { int Vessel_ID = 0; int CTM_ID = 0; int Office_ID = 0; if (Request.QueryString["Vessel_ID"] != null) { Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["Vessel_ID"].ToString()); } if (Request.QueryString["ID"] != null) { CTM_ID = UDFLib.ConvertToInteger(Request.QueryString["ID"].ToString()); } if (Request.QueryString["Office_ID"] != null) { Office_ID = UDFLib.ConvertToInteger(Request.QueryString["Office_ID"].ToString()); } DataTable dt = BLL_PB_PortageBill.Get_CTM_Denominations(Vessel_ID, CTM_ID, Office_ID); gvDenominations.DataSource = dt; gvDenominations.DataBind(); }
protected void btnSave_Click(object sender, EventArgs e) { try { int Vessel_ID = int.Parse(ddlVessel.SelectedValue); DateTime?Date = UDFLib.ConvertDateToNull(txtInitialDate.Text); if (Date == null) { lblMessage.Text = "Please enter valid portage bill date" + TodayDateFormat; return; } int Key = BLL_PB_PortageBill.INS_Initial_Office_Portage_Bill_DL(Vessel_ID, Date, int.Parse(Session["USERID"].ToString())); if (Key == 1) { lblMessage.Text = "Initialize office portage bill has been saved successfully."; } else { lblMessage.Text = "Initialize office portage bill already exists."; } } catch (Exception ex) { lblMessage.Text = ex.Message; } }
protected void BindItems() { try { int Record_Count = 0; DataTable dt = BLL_PB_PortageBill.Get_Lib_Crew_Welfare(UDFLib.ConvertIntegerToNull(ddlVessel.SelectedValue), UDFLib.ConvertDateToNull(ddlEectiveDates.SelectedValue), pagerWf.CurrentPageIndex, pagerWf.PageSize, ref Record_Count); UDFLib.ChangeColumnDataType(dt, "Effective_Date", typeof(string)); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { if (!string.IsNullOrEmpty(dr["Effective_Date"].ToString())) { dr["Effective_Date"] = UDFLib.ConvertUserDateFormat(Convert.ToString(dr["Effective_Date"].ToString()), UDFLib.GetDateFormat()); } } } gvWelfare.DataSource = dt; gvWelfare.DataBind(); pagerWf.CountTotalRec = Record_Count.ToString(); pagerWf.BuildPager(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); } }
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(); } } }
protected void Load_Allotments() { //int? AmountValue = chkAmountIsGreaterthanZero.Checked == true ? UDFLib.ConvertIntegerToNull(1) : null; gvAllotments.PageSize = int.Parse(ddlPageSize.SelectedValue); DataTable dt = BLL_PB_PortageBill.Get_PerMOAllotments(int.Parse(ddlFleet.SelectedValue) , int.Parse(ddlVessel.SelectedValue) , ddlMonth.SelectedValue , ddlYear.SelectedValue , int.Parse(ddlManningAgent.SelectedValue) , int.Parse(DDLBank.SelectedValue) , CrewID , Convert.ToInt32(ddlCountry.SelectedValue)); gvAllotments.DataSource = dt; gvAllotments.DataBind(); lblRecordCount.Text = dt.Rows.Count.ToString(); if (gvAllotments.PageCount > 0) { lblPageStatus.Text = (gvAllotments.PageIndex + 1).ToString() + " of " + gvAllotments.PageCount.ToString(); } else { lblPageStatus.Text = "0 of 0"; } UpdatePanel2.Update(); }
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 Load_Years() { DataSet dsdate = BLL_PB_PortageBill.Get_PB_YearMonth(null); ddlYear.DataSource = dsdate.Tables[0]; ddlYear.DataTextField = "pbyear"; ddlYear.DataValueField = "pbyear"; ddlYear.DataBind(); ddlMonth.DataSource = dsdate.Tables[1]; ddlMonth.DataTextField = "smonth"; ddlMonth.DataValueField = "imonth"; ddlMonth.DataBind(); ddlYear.Items.Insert(0, new ListItem("-SELECT ALL-", "0")); ddlMonth.Items.Insert(0, new ListItem("-SELECT ALL-", "0")); if (ddlYear.Items.FindByValue(DateTime.Now.Year.ToString()) != null) { ddlYear.Items.FindByValue(DateTime.Now.Year.ToString()).Selected = true; } if (ddlMonth.Items.FindByValue(DateTime.Now.Month.ToString()) != null) { ddlMonth.Items.FindByValue(DateTime.Now.Month.ToString()).Selected = true; } }
protected void Load_VesselMinCTM() { DataTable dt = BLL_PB_PortageBill.Get_VesselMinCTM(UDFLib.ConvertToInteger(ddlFleet.SelectedValue), UDFLib.ConvertToInteger(ddlVessel.SelectedValue), GetSessionUserID()); gvVesselMinCTM.DataSource = dt; gvVesselMinCTM.DataBind(); }
protected void ddlYear_SelectedIndexChanged(object sender, EventArgs e) { DataSet dsdate = BLL_PB_PortageBill.Get_PB_YearMonth(UDFLib.ConvertIntegerToNull(ddlYear.SelectedValue.ToString())); ddlMonth.ClearSelection(); ddlMonth.DataSource = dsdate.Tables[1]; ddlMonth.DataTextField = "smonth"; ddlMonth.DataValueField = "imonth"; ddlMonth.DataBind(); ddlMonth.Items.Insert(0, new ListItem("-SELECT ALL-", "0")); if (ViewState["Month"] != null && ViewState["Month"] != "0") { if (dsdate.Tables[1].Rows.Count > 0) { DataRow[] result = dsdate.Tables[1].Select("imonth = '" + UDFLib.ConvertIntegerToNull(ViewState["Month"].ToString()) + "' "); if (result.Length > 0) { ddlMonth.SelectedValue = ViewState["Month"].ToString(); } else { ddlMonth.SelectedIndex = 0; ViewState["Month"] = null; } } } Load_PB_Received(); int Fleet_ID = UDFLib.ConvertToInteger(ddlFleet.SelectedValue); int Vessel_ID = UDFLib.ConvertToInteger(ddlVessel.SelectedValue); int?Month = UDFLib.ConvertIntegerToNull(ddlMonth.SelectedValue); int?Year = UDFLib.ConvertIntegerToNull(ddlYear.SelectedValue); int iscount = ucCustomPagerPB.isCountRecord; }
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(); } } }
public string asyncGet_Side_Letter(int Voyage_ID) { return(UDFLib.CreateHtmlTableFromDataTable(BLL_PB_PortageBill.GET_Side_Letter(Voyage_ID), new string[] { "Amount(monthly)", "Total Days Served", "Total Amount" }, new string[] { "SD_AMT", "DAYS_SERVED", "TOTAL_AMT" }, new string[] { "right", "center", "right" }, "Side Letter")); }
protected void btnSave_Click(object sender, EventArgs e) { int Res = BLL_PB_PortageBill.INS_Crew_Salary_Instruction(GetCrewID(), UDFLib.ConvertToInteger(ddlVessel.SelectedValue), GetVoyageID(), UDFLib.ConvertToInteger(rdoEarndeduction.SelectedValue), txtPBDate.Text, UDFLib.ConvertToInteger(ddlType.SelectedValue), UDFLib.ConvertToDecimal(txtAmount.Text), txtRemarks.Text, GetSessionUserID()); Load_SalInstructions(); if (Res == 1) { lblMessage.Text = "Salary instruction added for the crew"; } }
protected void btnSave_Click(object sender, EventArgs e) { int Res = BLL_PB_PortageBill.INS_Crew_Salary_Instruction(GetCrewID(), UDFLib.ConvertToInteger(ddlVessel.SelectedValue), GetVoyageID(), UDFLib.ConvertToInteger(rdoEarndeduction.SelectedValue), txtPBDate.Text, UDFLib.ConvertToInteger(ddlType.SelectedValue), UDFLib.ConvertToDecimal(txtAmount.Text), txtRemarks.Text, GetSessionUserID()); if (Res == 1) { string js1 = "alert('Salary instruction added for the staff');parent.hideModal('dvPopupFrame');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "msg11", js1, true); } }
protected void btnReworkAllotmentToVessel_Click(object sender, EventArgs e) { try { int sts = BLL_PB_PortageBill.UPD_Rework_Allotment(Convert.ToInt32(ddlVessel.SelectedValue), Convert.ToInt32(Session["UserID"]), Convert.ToDateTime((sender as Button).CommandArgument)); } catch (Exception ex) { lblmsg.Text = ex.Message; } }
protected void gvAllotments_RowUpdating(object sender, GridViewUpdateEventArgs e) { BLL_PB_PortageBill.Update_Allotment(Convert.ToInt32(e.Keys["Vessel_ID"]), Convert.ToInt32(e.Keys["AllotmentID"]), UDFLib.ConvertToDecimal(((TextBox)gvAllotments.Rows[e.RowIndex].FindControl("txtAllotmentAmount")).Text), Convert.ToInt32(((DropDownList)gvAllotments.Rows[e.RowIndex].FindControl("ddlAccount")).SelectedValue), Convert.ToInt32(Session["userid"])); gvAllotments.EditIndex = -1; Load_Allotments(); }
protected void btnUnverify_Click(object s, EventArgs e) { try { BLL_PB_PortageBill.Unverify_Allotment(int.Parse(((Button)s).CommandArgument.Split(',')[0]), int.Parse(((Button)s).CommandArgument.Split(',')[1]), GetSessionUserID()); Load_Allotments(); } catch (Exception ex) { throw ex; } }
private void Load_PortageBill() { try { string _SortOrderColumns = "DOA_HomePort , RANK_SORT_ORDER "; Dictionary <string, UDCHyperLink> DicLink = new Dictionary <string, UDCHyperLink>(); lblPageTitle.Text = "Portage Bill : " + Convert.ToString(ViewState["Vessel_Name"]) + " - " + DateTime.Parse(ViewState["PBDt"].ToString()).ToString("MMM-yyyy"); UDCHyperLink alink = new UDCHyperLink(); alink.Target = "_blank"; alink.NaviagteURL = "../crew/CrewDetails.aspx"; alink.QueryStringDataColumn = new string[] { "VoyageID", "CrewID" }; alink.QueryStringText = new string[] { "VoyageID", "ID" }; DicLink.Add("Code", alink); DataSet dsPb = BLL_PB_PortageBill.Get_PortageBill(Convert.ToInt32(DateTime.Parse(ViewState["PBDt"].ToString()).Month), Convert.ToInt32(DateTime.Parse(ViewState["PBDt"].ToString()).Year), Convert.ToInt32(ViewState["Vessel_ID"]), UDFLib.ConvertStringToNull(null), 0); dtcomment = dsPb.Tables["Comment"]; dtEntryType = dsPb.Tables["EntryType"]; DataTable dtpb = UDFLib.PivotTable("Description", "Amount", "Sort_Order", new string[] { "VOYAGEID", "PBMONTH", "PBYEAR" }, new string[] { "VOYAGEID", "PBMONTH", "PBYEAR", "RANK_SORT_ORDER", "IsFinalized", "DOA_HomePort", "RANK_SORT_ORDER", "Amount", "Description", "Sort_Order", "CrewID" }, _SortOrderColumns, DicLink, dsPb.Tables["Data"] ); totalEarnID = dtpb.Columns.IndexOf("Total Earning"); totalDedID = dtpb.Columns.IndexOf("Total Deduction"); BFid = dtpb.Columns.IndexOf("balance"); dtpb.DefaultView.RowFilter = "rank <> ''"; DataTable dt = dtpb.DefaultView.ToTable(); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { if (!string.IsNullOrEmpty(dr["From"].ToString())) { dr["From"] = UDFLib.ConvertUserDateFormat(Convert.ToDateTime(dr["From"].ToString()).ToString("dd/MM/yyyy"), UDFLib.GetDateFormat()); } if (!string.IsNullOrEmpty(dr["To"].ToString())) { dr["To"] = UDFLib.ConvertUserDateFormat(Convert.ToDateTime(dr["To"].ToString()).ToString("dd/MM/yyyy"), UDFLib.GetDateFormat()); } } } GridViewPB.DataSource = dt; GridViewPB.DataBind(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); } }
protected void CaptCashGV_RowDataBound(object sender, GridViewRowEventArgs e) { DataSet RptDs = BLL_PB_PortageBill.LatestReportID(); for (int i = 0; i < CaptCashGV.Rows.Count; i++) { string Id = ((Label)(CaptCashGV.Rows[i].Cells[CaptCashGV.Columns.Count - 2].FindControl("lblrptID"))).Text; string Vessel = ((Label)(CaptCashGV.Rows[i].Cells[CaptCashGV.Columns.Count - 1].FindControl("lblVesselCode"))).Text; for (int j = 0; j < RptDs.Tables[0].Rows.Count; j++) { if ((RptDs.Tables[0].Rows[j][0].ToString() == Id) && (RptDs.Tables[0].Rows[j][1].ToString() == Vessel)) { ImageButton imgbtn = (ImageButton)(CaptCashGV.Rows[i].Cells[CaptCashGV.Columns.Count - 3].FindControl("btnUnlcok")); imgbtn.Enabled = true; } else { //ImageButton imgbtn = (ImageButton)(CaptCashGV.Rows[i].Cells[CaptCashGV.Columns.Count - 3].FindControl("btnUnlcok")); //imgbtn.ImageUrl = "~/images/lock.png"; } } } if (e.Row.RowType == DataControlRowType.DataRow) { //ImageButton imgbtn = (ImageButton)(e.Row.Cells[CaptCashGV.Columns.Count - 3].FindControl("btnUnlcok")); //string Id = ((Label)(e.Row.Cells[CaptCashGV.Columns.Count - 2].FindControl("lblrptID"))).Text; //string Vessel = ((Label)(e.Row.Cells[CaptCashGV.Columns.Count - 1].FindControl("lblVesselCode"))).Text; //NameValueCollection queryStringsView = new NameValueCollection(); //Session["Name"] = e.Row.Cells[0].Text.ToString(); //queryStringsView.Add("ViewId", Id); //queryStringsView.Add("ViewId", Vessel); //string encryptedStringview = CryptoQueryStringHandler.EncryptQueryStrings(queryStringsView, // WebConfigurationManager.AppSettings["CryptoKey"]); //string popupScriptview = "ViewPopupId('" + queryStringsView + "')"; //for (int k = 0; k < e.Row.Cells.Count - 1; k++) //{ // if (k != CaptCashGV.Columns.Count - 3) // { // e.Row.Attributes.Add("onMouseOver", "this.style.cursor='hand';"); // e.Row.Attributes.Add("onclick", popupScriptview); // } //} } }
protected void btnFinalizePortageBill_Click(object sender, EventArgs e) { if ((BLL_PB_PortageBill.Upd_Finalize_PortageBill(UDFLib.ConvertToInteger(ViewState["Open_PB_Month"]), UDFLib.ConvertToInteger(ViewState["Open_PB_Year"]), Convert.ToInt32(ViewState["Vessel_ID"]), Convert.ToInt32(Session["UserID"]))) == -2) { String msg1 = String.Format("alert('Future month portage bill can not be finalized.');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgshowverifyrefresgclosehf", msg1, true); } else { btnFinalizePortageBill.Enabled = false; btnGeneratePortageBill.Enabled = false; } }
protected void btnDelete_Click(object s, EventArgs e) { try { string[] strArg = ((ImageButton)s).CommandArgument.Split(','); BLL_PB_PortageBill.Delete_Allotment(Int32.Parse(strArg[2]), Convert.ToInt32(strArg[0]), Convert.ToDateTime(strArg[1]), GetSessionUserID()); Load_Allotments(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { System.Data.DataTable dtBow = BLL_PB_PortageBill.Get_BOW_Document(UDFLib.ConvertToInteger(Request.QueryString["Vessel_ID"]), UDFLib.ConvertDateToNull(Request.QueryString["PBill_Date"])); gvBOWDocuments.DataSource = dtBow; gvBOWDocuments.DataBind(); if (dtBow.Rows.Count > 0) { lblpageheader.Text = "Scanned copy of BOW : Vessel - " + dtBow.Rows[0]["Vessel_Name"].ToString() + ", PBill Date - " + dtBow.Rows[0]["PBill_Date"].ToString(); } } }
protected void Load_PB_Received() { int Fleet_ID = UDFLib.ConvertToInteger(ddlFleet.SelectedValue); int Vessel_ID = UDFLib.ConvertToInteger(ddlVessel.SelectedValue); int?Month = UDFLib.ConvertIntegerToNull(ddlMonth.SelectedValue); int?Year = UDFLib.ConvertIntegerToNull(ddlYear.SelectedValue); int iscount = ucCustomPagerPB.isCountRecord; GridViewPB.DataSource = BLL_PB_PortageBill.Get_PortageBills(Fleet_ID, Vessel_ID, Month, Year, ucCustomPagerPB.CurrentPageIndex, ucCustomPagerPB.PageSize, ref iscount); GridViewPB.DataBind(); ucCustomPagerPB.CountTotalRec = iscount.ToString(); ucCustomPagerPB.BuildPager(); }
protected void Get_LastPBDate() { string dt = BLL_PB_PortageBill.Get_LastPortageBillDate(UDFLib.ConvertToInteger(ddlVessel.SelectedValue)); txtPBDate.Text = dt; if (dt == "") { DateTime lastDayOfThisMonth = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).AddMonths(1).AddDays(-1); txtPBDate.Text = lastDayOfThisMonth.ToString("dd/MM/yyyy"); } else { txtPBDate.Enabled = false; } }
public string asyncGet_CTM_Attachments(int CTM_ID, int Vessel_ID) { UDCHyperLink aLink = new UDCHyperLink("DocURL", "../uploads/CrewAccount", new string[] { }, new string[] { }, "_blank"); Dictionary <string, UDCHyperLink> dicLink = new Dictionary <string, UDCHyperLink>(); dicLink.Add("Doc_Name", aLink); return(UDFLib.CreateHtmlTableFromDataTable(BLL_PB_PortageBill.Get_CTM_Attachments(CTM_ID, Vessel_ID), new string[] { "Attachments" }, new string[] { "Doc_Name" }, dicLink, new Dictionary <string, UDCToolTip>(), new string[] { "center" }, "CreateHtmlTableFromDataTable-table", "CreateHtmlTableFromDataTable-DataHedaer", "CreateHtmlTableFromDataTable-Data")); }
public string asyncGet_Portage_Bill_Attachments(int Vessel_ID, string month, string year, int Doc_type) { UDCHyperLink aLink = new UDCHyperLink("DocURL", "../uploads/CrewAccount", new string[] { }, new string[] { }, "_blank"); Dictionary <string, UDCHyperLink> dicLink = new Dictionary <string, UDCHyperLink>(); dicLink.Add("Doc_Name", aLink); return(UDFLib.CreateHtmlTableFromDataTable(BLL_PB_PortageBill.Get_Portage_Bill_Attachments(Vessel_ID, month, year, Doc_type), new string[] { }, new string[] { "Doc_Name" }, dicLink, new Dictionary <string, UDCToolTip>(), new string[] { "left" }, "CreateHtmlTableFromDataTable-table", "CreateHtmlTableFromDataTable-DataHedaer", "CreateHtmlTableFromDataTable-Data")); }
protected void btnReOpenFlag_Click(object s, EventArgs e) { try { BLL_PB_PortageBill.ACC_INS_Allotment_Flag(Convert.ToInt32(hdfFlagReOpenAllotmentID.Value), Convert.ToInt32(hdfFlagReOpenVesselID.Value), Convert.ToDateTime(hdfFlagReOpenPBillDate.Value), "Re-Open :" + Environment.NewLine + txtReasonForReopenFlag.Text, Convert.ToInt32(Session["userid"]), (DataTable)Session["dtFlagFiles"], "OPEN"); Load_Allotments(); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgshowReopen", " hideModal('dvReOpenFlag');", true); } catch (System.Exception ex) { } finally { Session["dtFlagFiles"] = createDtFlagAttach(); } }
protected void btnSave_Click(object sender, EventArgs e) { foreach (GridViewRow dr in gvVesselMinCTM.Rows) { try { string Vessel_ID = ((HiddenField)dr.FindControl("hdnVesselID")).Value; string Min_CTM = (((TextBox)dr.FindControl("txtMinCTM")).Text).ToString(); if (Min_CTM != "") { BLL_PB_PortageBill.UPDATE_VesselMinCTM(int.Parse(Vessel_ID), decimal.Parse(Min_CTM), GetSessionUserID()); } } catch { } } Load_VesselMinCTM(); }
public void CaptCashBind() { int?Vessel_ID; if (ddlVessel.SelectedValue.ToString() == "" || ddlVessel.SelectedValue.ToString() == "0") { Vessel_ID = null; } else { Vessel_ID = Convert.ToInt32(ddlVessel.SelectedValue); } DataSet CaptCashDs = BLL_PB_PortageBill.Get_CapCashReportCur(Vessel_ID); CaptCashGV.DataSource = CaptCashDs.Tables[0]; CaptCashGV.DataBind(); }
protected void tbnMarkCompleted_Click(object s, EventArgs e) { try { BLL_PB_PortageBill.ACC_INS_Allotment_Flag(Convert.ToInt32(hdfAllotmentIDFlag.Value), Convert.ToInt32(hdfVesselIDFlag.Value), Convert.ToDateTime(hdfPBillDateFlag.Value), txtFlagRemark.Text, Convert.ToInt32(Session["userid"]), (DataTable)Session["dtFlagFiles"], "CLOSE"); SendMailOnFlagSave(Convert.ToInt32(hdfAllotmentIDFlag.Value), Convert.ToInt32(hdfVesselIDFlag.Value), Convert.ToDateTime(hdfPBillDateFlag.Value).ToString(), Convert.ToInt32(hdfCrewIDFlag.Value)); Load_Allotments(); String msg1 = String.Format("hideModal('dvFlagRemark');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgshowverifyrefresg", msg1, true); } catch (Exception ex) { Session["dtFlagFiles"] = createDtFlagAttach(); } finally { } }