protected void Load_Crew_Queries() { int FleetCode = UDFLib.ConvertToInteger(ddlFleet.SelectedValue); int Vessel_ID = UDFLib.ConvertToInteger(ddlVessel.SelectedValue); int Query_Type = UDFLib.ConvertToInteger(ddlQueryType.SelectedValue); int Status = UDFLib.ConvertToInteger(rdoStatus.SelectedValue); int PAGE_SIZE = ucCustomPager_CrewQueries.PageSize; int PAGE_INDEX = ucCustomPager_CrewQueries.CurrentPageIndex; int SelectRecordCount = ucCustomPager_CrewQueries.isCountRecord; string SortBy = (ViewState["SORTBY"] == null) ? null : (ViewState["SORTBY"].ToString()); int? SortDirection = null; if (ViewState["SORTDIRECTION"] != null) { SortDirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } DataTable dt = BLL_Crew_Queries.Get_CrewQueries(FleetCode, Vessel_ID, 0, Query_Type, Status, txtFilterText.Text, GetSessionUserID(), PAGE_SIZE, PAGE_INDEX, ref SelectRecordCount, SortBy, SortDirection); ddlQueryType.DataSource = dt; GridView_CrewQueries.DataSource = dt; GridView_CrewQueries.DataBind(); if (ucCustomPager_CrewQueries.isCountRecord == 1) { ucCustomPager_CrewQueries.CountTotalRec = SelectRecordCount.ToString(); ucCustomPager_CrewQueries.BuildPager(); } }
protected void btnApproveClaims_Click(object sender, EventArgs e) { int QueryID = UDFLib.ConvertToInteger(Request.QueryString["ID"]); int Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["VID"]); Repeater rptClaims = ((Repeater)frmDetails.FindControl("rptClaims")); decimal Req_USD = 0; decimal Apr_USD = 0; DataTable Claims = new DataTable(); Claims.Columns.Add("PID", typeof(int)); Claims.Columns.Add("VALUE", typeof(string)); foreach (RepeaterItem oItem in rptClaims.Items) { if (oItem.ItemType.ToString() == "Item" || oItem.ItemType.ToString() == "AlternatingItem") { CheckBox chkApproval = (CheckBox)oItem.FindControl("chkApproval"); Label lblRequestedUSD = (Label)oItem.FindControl("lblRequestedUSD"); TextBox txtApprovedUSD = (TextBox)oItem.FindControl("txtApprovedUSD"); HiddenField hdnClaimID = (HiddenField)oItem.FindControl("hdnClaimID"); if (chkApproval != null) { if (chkApproval.Checked == true) { if (lblRequestedUSD != null) { Req_USD = UDFLib.ConvertToDecimal(lblRequestedUSD.Text); } if (lblRequestedUSD != null) { Apr_USD = UDFLib.ConvertToDecimal(txtApprovedUSD.Text); } if (hdnClaimID != null) { Claims.Rows.Add(UDFLib.ConvertToInteger(hdnClaimID.Value), Apr_USD); } } } } } if (Claims.Rows.Count > 0) { int Res = BLL_Crew_Queries.Approve_CrewQuery_Claims(QueryID, Vessel_ID, Claims, GetSessionUserID()); Load_Crew_Query_Details(); if (Res > 0) { string js = "alert('Selected claims approved !!)"; ScriptManager.RegisterStartupScript(this, this.GetType(), "initscript1", js, true); } } }
protected void Load_FollowUps() { int QID = UDFLib.ConvertToInteger(Request.QueryString["QID"]); int VID = UDFLib.ConvertToInteger(Request.QueryString["VID"]); DataTable dt = BLL_Crew_Queries.Get_CrewQuery_Followups(QID, VID, GetSessionUserID()); rptFollowUps.DataSource = dt; rptFollowUps.DataBind(); }
protected void Load_CrewQuery_Types() { DataTable dt = BLL_Crew_Queries.Get_CrewQuery_Types(GetSessionUserID()); ddlQueryType.DataSource = dt; ddlQueryType.DataTextField = "Query_Type"; ddlQueryType.DataValueField = "ID"; ddlQueryType.DataBind(); ddlQueryType.Items.Insert(0, new ListItem("-SELECT ALL-", "0")); ddlQueryType.SelectedIndex = 0; }
public string Get_CrewQuery_Followups(int QueryID, int VesselID, int UserID) { DataTable dt = BLL_Crew_Queries.Get_CrewQuery_Followups(QueryID, VesselID, UserID); return(UDFLib.CreateHtmlTableFromDataTable(dt, new string[] { "Date", "From", "Message" }, new string[] { "Date_Of_Creation", "CreatedBy", "Followup_Text" }, new string[] { }, "CrewQuery-Followup-table", "CrewQuery-Followup-DataHeder", "CrewQuery-Followup-Data")); }
protected void btnSaveFollowUp_Click(object sender, EventArgs e) { int QueryID = UDFLib.ConvertToInteger(Request.QueryString["ID"]); int Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["VID"]); //int Send_To_Ship = chkSendToShip.Checked == true?1:0; int Res = BLL_Crew_Queries.INSERT_CrewQuery_FollowUp(QueryID, Vessel_ID, txtFollowUp.Text, 0, GetSessionUserID()); if (Res > 0) { string js = "alert('FollowUp added!!)"; ScriptManager.RegisterStartupScript(this, this.GetType(), "initscript1", js, true); txtFollowUp.Text = ""; Load_Crew_Query_Details(); } }
protected void Load_Crew_Query_Details() { int QueryID = UDFLib.ConvertToInteger(Request.QueryString["ID"]); int Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["VID"]); DataSet ds = BLL_Crew_Queries.Get_CrewQuery_Details(QueryID, Vessel_ID, GetSessionUserID()); frmDetails.DataSource = ds.Tables[0]; frmDetails.DataBind(); ((Repeater)frmDetails.FindControl("rptClaims")).DataSource = ds.Tables[1]; ((Repeater)frmDetails.FindControl("rptClaims")).DataBind(); ((Repeater)frmDetails.FindControl("rptFollowUps")).DataSource = ds.Tables[2]; ((Repeater)frmDetails.FindControl("rptFollowUps")).DataBind(); ((Repeater)frmDetails.FindControl("rptAttachments")).DataSource = ds.Tables[3]; ((Repeater)frmDetails.FindControl("rptAttachments")).DataBind(); }
public string Get_CrewQuery_Attachments(int QueryID, int VesselID, int UserID) { DataTable dt = BLL_Crew_Queries.Get_CrewQuery_Attachments(QueryID, VesselID, UserID); UDCHyperLink aLink = new UDCHyperLink("DocURL", "", new string[] { }, new string[] { }, "_blank"); Dictionary <string, UDCHyperLink> dicLink = new Dictionary <string, UDCHyperLink>(); dicLink.Add("Attachment_Name", aLink); return(UDFLib.CreateHtmlTableFromDataTable(dt, new string[] { "Attachments" }, new string[] { "Attachment_Name" }, dicLink, new Dictionary <string, UDCToolTip>(), new string[] { "left" }, "CrewQuery-Attachments-table", "CrewQuery-Attachments-DataHeder", "CrewQuery-Attachments-Data")); }
protected void Load_Crew_Queries() { int FleetCode = 0; int Vessel_ID = 0; int CrewID = UDFLib.ConvertToInteger(Request.QueryString["CrewID"]); int Query_Type = 0; int Status = 0; int PAGE_SIZE = 1000; int PAGE_INDEX = 1; int SelectRecordCount = 0; string SortBy = (ViewState["SORTBY"] == null) ? null : (ViewState["SORTBY"].ToString()); int? SortDirection = null; if (ViewState["SORTDIRECTION"] != null) { SortDirection = Int32.Parse(ViewState["SORTDIRECTION"].ToString()); } DataTable dt = BLL_Crew_Queries.Get_CrewQueries(FleetCode, Vessel_ID, CrewID, Query_Type, Status, null, GetSessionUserID(), PAGE_SIZE, PAGE_INDEX, ref SelectRecordCount, SortBy, SortDirection); GridView_CrewQueries.DataSource = dt; GridView_CrewQueries.DataBind(); }