protected void Bind_Quote_Details() { BLL_TRV_QuoteRequest objRFQ = new BLL_TRV_QuoteRequest(); DataSet dsQuoteDetails = objRFQ.Get_Quotation_Details(Convert.ToInt32(Request.QueryString["RequestID"]), Convert.ToInt32(Request.QueryString["QuoteID"])); if (dsQuoteDetails.Tables.Count > 1) { dsQuoteDetails.Tables[1].PrimaryKey = new DataColumn[] { dsQuoteDetails.Tables[1].Columns["id"] }; GrdFlight.DataSource = dsQuoteDetails.Tables[1]; GrdFlight.DataBind(); } if (dsQuoteDetails.Tables[0].Rows.Count > 0) { txtGDSLocator.Text = dsQuoteDetails.Tables[0].Rows[0]["GDSLocator"].ToString(); txtTicketDeadline.Text = dsQuoteDetails.Tables[0].Rows[0]["TicketingDeadline"].ToString(); cmbHours.Items.FindByValue(dsQuoteDetails.Tables[0].Rows[0]["TimeHours"].ToString()).Selected = true; cmbMins.Items.FindByValue(dsQuoteDetails.Tables[0].Rows[0]["TimeMins"].ToString()).Selected = true; txtFare.Text = dsQuoteDetails.Tables[0].Rows[0]["Fare"].ToString(); txtTax.Text = dsQuoteDetails.Tables[0].Rows[0]["Tax"].ToString(); txtPNRText.Text = dsQuoteDetails.Tables[0].Rows[0]["Remarks"].ToString(); cmbCurrency.Items.FindByValue(dsQuoteDetails.Tables[0].Rows[0]["currency"].ToString()).Selected = true; txtbaggageallowances.Text = dsQuoteDetails.Tables[0].Rows[0]["Baggage_Charge"].ToString(); txtCancellationCharge.Text = dsQuoteDetails.Tables[0].Rows[0]["Cancellation_Charge"].ToString(); txtDateChangeAllow.Text = dsQuoteDetails.Tables[0].Rows[0]["Date_Change_Charge"].ToString(); } }
protected void cmdUpdateQuote_Click(object source, EventArgs e) { string msgmodal = ""; BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); int QuoteID = Convert.ToInt32(Request.Form["hdQuoteID"].ToString()); try { if (txtFare.Text.Trim() != "" && txtTax.Text.Trim() != "" && txtTicketDeadline.Text.Trim() != "" && txtGDSLocator.Text.Trim() != "") { Qr.UpdateQuotation(QuoteID, txtGDSLocator.Text.Trim(), Convert.ToDecimal(txtFare.Text.Trim()), Convert.ToDecimal(txtTax.Text.Trim()), Convert.ToDateTime(txtTicketDeadline.Text.Trim()), cmbCurrency.SelectedValue, Convert.ToInt32(Session["USERID"].ToString()), txtPNRText.Text, Convert.ToInt32(cmbHours.SelectedValue), Convert.ToInt32(cmbMins.SelectedValue)); GetTravelReqeustByID(); GetQuotations(); ClearBoxes(); } msgmodal = String.Format("hideModal('dvNewQuotation');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "closedvNewQuotation", msgmodal, true); } catch { throw; } finally { Qr = null; } }
protected void rptQuotes_ItemCommand(object source, RepeaterCommandEventArgs e) { try { if (e.CommandName.ToUpper() == "RESETQUOTE") { BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest(); int MailID = TRequest.ResetQuotation(requestID, 0, Convert.ToInt32(e.CommandArgument)); TRequest = null; string UploadFilePath = ConfigurationManager.AppSettings["TRV_UPLOAD_PATH"]; string URL = String.Format("window.open('../crew/EmailEditor.aspx?ID=+" + MailID.ToString() + @"&FILEPATH=" + UploadFilePath.Remove(UploadFilePath.Length - 1, 1).Replace(@"\", @"\\") + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "k" + MailID.ToString(), URL, true); GetQuotationForEvaluation(); } if (e.CommandName.ToUpper() == "PREFERENCE") { BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); Qr.UpdateUserPreference(requestID, Convert.ToInt32(e.CommandArgument), Convert.ToInt32(Session["USERID"])); Qr = null; GetTravelRequestDetails(); GetQuotationForEvaluation(); } } catch { } }
protected void cmdUpdateFlight_Click(object source, EventArgs e) { string msgmodal = ""; BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); int FlightID = Convert.ToInt32(Request.Form["hdFlightID"].ToString()); try { if (txtAirlineLocator.Text.Trim() != "" && txtFlight.Text.Trim() != "" && txtDeparureDate.Text.Trim() != "" && txtFrom.Text.Trim() != "" && txtTo.Text.Trim() != "") { Qr.UpdateQuoteFlight(FlightID, txtAirlineLocator.Text.Trim(), txtFrom.Text.Trim(), txtTo.Text.Trim(), "", txtFlight.Text.Trim(), cmbTravelClass.SelectedValue, Convert.ToDateTime(txtDeparureDate.Text.Trim()), Convert.ToDateTime(txtArrivalDate.Text.Trim()), cmbFlightStatus.SelectedValue, txtFlightRemark.Text.Trim(), Convert.ToInt32(Session["USERID"].ToString()), cmbArrHours.SelectedItem.Text, cmbArrMins.SelectedItem.Text, cmbDepHours.SelectedItem.Text, cmbDepMins.SelectedItem.Text); GetQuotations(); ClearBoxes(); } msgmodal = String.Format("hideModal('dvQuote');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "closedvQuoteedit", msgmodal, true); } catch { } finally { Qr = null; } }
protected void GrdFlight_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { if (GrdFlight.Rows.Count > 1) { DataTable dtFlight = CreateDtFlight();; DataRow dr = null; foreach (GridViewRow grFlt in GrdFlight.Rows) { dr = dtFlight.NewRow(); dr["ID"] = GrdFlight.DataKeys[grFlt.RowIndex].Values["ID"].ToString(); dr["Flight"] = (grFlt.FindControl("txtFlight") as TextBox).Text; dr["From"] = (grFlt.FindControl("txtFrom") as TextBox).Text; dr["To"] = (grFlt.FindControl("txtTo") as TextBox).Text; dr["FlightStatus"] = (grFlt.FindControl("cmbFlightStatus") as DropDownList).SelectedValue; dr["DepartureDate"] = (grFlt.FindControl("txtDeparureDate") as TextBox).Text; dr["DepHour"] = (grFlt.FindControl("cmbDepHours") as DropDownList).SelectedItem.Value; dr["DepMin"] = (grFlt.FindControl("cmbDepMins") as DropDownList).SelectedItem.Value; dr["ArrivalDate"] = (grFlt.FindControl("txtArrivalDate") as TextBox).Text; dr["ArrHour"] = (grFlt.FindControl("cmbArrHours") as DropDownList).SelectedItem.Value; dr["ArrMin"] = (grFlt.FindControl("cmbArrMins") as DropDownList).SelectedItem.Value; dr["Locator"] = (grFlt.FindControl("txtAirlineLocator") as TextBox).Text; dr["Remarks"] = (grFlt.FindControl("txtFlightRemark") as TextBox).Text; dr["TravelClass"] = (grFlt.FindControl("cmbTravelClass") as DropDownList).SelectedValue; dtFlight.Rows.Add(dr); } dr = dtFlight.Rows.Find(e.Keys["ID"].ToString()); if (dr != null) { if (!dr["id"].ToString().Contains("-")) { BLL_TRV_QuoteRequest qr = new BLL_TRV_QuoteRequest(); qr.DeleteQuoteFlight(Convert.ToInt32(dr["id"]), Convert.ToInt32(Session["USERID"].ToString())); } dtFlight.Rows.Remove(dr); } GrdFlight.DataSource = dtFlight; GrdFlight.DataBind(); } //ViewState["DataTable"] = dtFlight; } catch { } }
protected void rptParent_ItemCommand(object source, RepeaterCommandEventArgs e) { try { if (e.CommandName.ToUpper() == "SENDQUOTE") { BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); Qr.SendQuotaion(Convert.ToInt32(e.CommandArgument), Convert.ToInt32(Session["USERID"].ToString())); Qr = null; GetQuotations(); } } catch { } }
protected void GetCheapestOptions() { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); try { DataSet ds = new DataSet(); ds = QR.GetCheapestOptions(requestID); ViewState["ChepeastAmount"] = ds.Tables[0].Rows[0]["USD_Total_Amount"].ToString(); hdf_Cheapest_Totalamount.Value = ds.Tables[0].Rows[0]["USD_Total_Amount"].ToString(); } catch { } finally { QR = null; } }
protected void GetQuotationForEvaluation() { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); try { DataSet ds = new DataSet(); ds = QR.GetQuotationForEvaluation(requestID); rptQuotes.DataSource = ds; rptQuotes.DataBind(); hdf_No_of_Quotation.Value = ds.Tables[0].Rows.Count.ToString(); } catch { } finally { QR = null; } }
protected void GetQuotations() { BLL_TRV_QuoteRequest qr = new BLL_TRV_QuoteRequest(); DataSet ds = new DataSet(); try { ds = qr.GetQuotation(AgentID, RequestID); rptParent.DataSource = ds; rptParent.DataBind(); ViewState["SUPPCURRENCY"] = ds.Tables[2].Rows[0]["Supplier_Currency"].ToString(); ltQuotationDate.Text = ds.Tables[3].Rows[0]["QuoteBy_date"].ToString(); } catch { } finally { qr = null; } }
protected void rptChild_ItemCommand(object source, RepeaterCommandEventArgs e) { int id; try { if (e.CommandName == "removeflight") { BLL_TRV_QuoteRequest qr = new BLL_TRV_QuoteRequest(); id = Convert.ToInt32(e.CommandArgument); qr.DeleteQuoteFlight(id, Convert.ToInt32(Session["USERID"].ToString())); qr = null; GetQuotations(); } } catch { } }
protected void GetQuotations() { BLL_TRV_QuoteRequest qr = new BLL_TRV_QuoteRequest(); DataSet ds = new DataSet(); try { ds = qr.Get_Quotation_Ticket(UDFLib.ConvertToInteger(Request.QueryString["requestid"].ToString())); rptParent.DataSource = ds.Tables[0]; rptParent.DataBind(); rptChild.DataSource = ds.Tables[1]; rptChild.DataBind(); } catch { } finally { qr = null; } }
protected void btnSendForApproval_Click(object s, EventArgs e) { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest(); BLL_Infra_UserCredentials objuser = new BLL_Infra_UserCredentials(); DataTable dtuser = objuser.Get_UserDetails(Int32.Parse(lstUserList.SelectedValue)); DataTable dtCurrentuser = objuser.Get_UserDetails(Convert.ToInt32(Session["userid"])); QR.Insert_Approval_Entry(Convert.ToInt32(Session["USERID"].ToString()), Int32.Parse(lstUserList.SelectedValue), 0, Convert.ToInt32(Request.QueryString["requestid"].ToString()), txtRemark.Text, ""); string msgmodal = String.Format("alert('Sent successfully to selected approver.');window.close();window.opener.location.reload();"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Apprmodal", msgmodal, true); }
protected void btnSendForApprovalByPIC_Click(object s, EventArgs e) { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); int ApproverID = 0; int ForApproval; if (lstMngApprList.SelectedItem.Value == "0" && ListBoxPOApprover.SelectedItem.Value != "0") // sending for po approval { ApproverID = int.Parse(ListBoxPOApprover.SelectedItem.Value); ForApproval = 1; } else if (lstMngApprList.SelectedItem.Value != "0" && ListBoxPOApprover.SelectedItem.Value == "0")// sending for Manager approval { ApproverID = int.Parse(lstMngApprList.SelectedItem.Value); ForApproval = 2; } else if (lstMngApprList.SelectedItem.Value == "0" && ListBoxPOApprover.SelectedItem.Value == "0") // atleat one should be selected { lblMessageOnSendApproval.Visible = true; lblMessageOnSendApproval.Text = "Please select Approver !"; return; } else // both can not be selected at a time { lblMessageOnSendApproval.Visible = true; lblMessageOnSendApproval.Text = "PO approver and Managerial approver can not be selected simultaneously !"; return; } if (ApproverID != 0) { QR.Insert_Approval_Entry(UDFLib.ConvertToInteger(Session["USERID"].ToString()), ApproverID, 0, UDFLib.ConvertToInteger(Request.QueryString["requestid"]), txtSendForAppRemark.Text, "", ForApproval); string msgmodal = String.Format("alert('Request sent successfully');hideModal('divSendForApproval');window.close();window.opener.location.reload();"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Apprmodal", msgmodal, true); } }
protected void Page_Load(object sender, EventArgs e) { objUA.Add = 1; objUA.Approve = 1; objUA.Delete = 1; objUA.Edit = 1; objUA.View = 1; if (Request.QueryString["requestid"] != null) { try { requestID = Convert.ToInt32(Request.QueryString["requestid"].ToString()); ltRequestid.Text = requestID.ToString(); if (!IsPostBack) { BLL_TRV_TravelRequest objT = new BLL_TRV_TravelRequest(); DataTable dtsts = objT.Get_Request_ApprovalStatus(requestID); if (dtsts.Rows.Count > 0) { if (dtsts.Rows[0]["Sent_For_Approval"].ToString() == "1" && dtsts.Rows[0]["currentStatus"].ToString() == "QUOTE RECEIVED") { IsApproving = 1; } } ViewState["ChepeastAmount"] = null; GetTravelRequestDetails(); GetCheapestOptions(); GetQuotationForEvaluation(); BLL_TRV_QuoteRequest objAppHis = new BLL_TRV_QuoteRequest(); gvApprovals.DataSource = objAppHis.Get_Approval_History(requestID); gvApprovals.DataBind(); } } catch { } } }
protected void Page_Load(object sender, EventArgs e) { try { UserAccessValidation(); hdf_UserID.Value = Session["USERID"].ToString(); if (!IsPostBack) { BLL_Infra_VesselLib objInfra = new BLL_Infra_VesselLib(); ddlVessel_Manager.DataSource = objInfra.Get_VesselManagerList(); ddlVessel_Manager.DataTextField = "COMPANY_NAME"; ddlVessel_Manager.DataValueField = "ID"; ddlVessel_Manager.DataBind(); ddlVessel_Manager.Items.Insert(0, new ListItem("-Select All-", "0")); ViewState["Status"] = "RFQ RECEIVED"; BindTravelAgentRequests(); txtSelMenu.Value = LinkmenuNew.ClientID; BLL_TRV_QuoteRequest objtrequser = new BLL_TRV_QuoteRequest(); ListItem liSlt = new ListItem(); liSlt.Text = "--ALL--"; liSlt.Value = "0"; liSlt.Selected = true; ddlQuotedBy.DataSource = objtrequser.Get_Quoted_By_Agent(Convert.ToInt32(Session["USERID"])); ddlQuotedBy.DataBind(); ddlQuotedBy.Items.Insert(0, liSlt); ddlRequestedBy.DataSource = objtrequser.Get_Requestor_By_Agent(Convert.ToInt32(Session["USERID"])); ddlRequestedBy.DataBind(); ddlRequestedBy.Items.Insert(0, liSlt); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "selectNode", "selMe('" + txtSelMenu.Value + "');", true); } string js1 = "bindPaxsName();"; ScriptManager.RegisterStartupScript(this, this.GetType(), "bindPaxsName", js1, true); } catch { throw; } }
private void MakeFlightList() { try { BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); DataTable dtFlight = CreateDtFlight(); DataRow dr = dtFlight.NewRow(); DataSet dsReqst = Qr.Get_Request_Ticket_Details(Convert.ToInt32(Request.QueryString["RequestID"].ToString())); dr["ID"] = System.Guid.NewGuid().ToString(); dr["FlightStatus"] = "Confirm"; if (dsReqst.Tables[0].Rows.Count > 0) { dr["DepartureDate"] = dsReqst.Tables[0].Rows[0]["DepartureDate"].ToString(); dr["TravelClass"] = dsReqst.Tables[0].Rows[0]["classOfTravel"].ToString(); dr["ArrivalDate"] = dsReqst.Tables[0].Rows[0]["DepartureDate"].ToString(); } if (dsReqst.Tables[1].Rows.Count > 0) { dr["From"] = dsReqst.Tables[1].Rows[0]["travelOrigin"].ToString(); dr["To"] = dsReqst.Tables[1].Rows[0]["travelDestination"].ToString(); } dr["TravelClass"] = "Economy"; dr["FlightStatus"] = "Confirm"; dr["ArrHour"] = "0"; dr["ArrMin"] = "0"; dr["DepHour"] = "0"; dr["DepMin"] = "0"; dtFlight.Rows.Add(dr); // ViewState["DataTable"] = dtFlight; GrdFlight.DataSource = dtFlight; GrdFlight.DataBind(); } catch { } }
protected void sendRFQ(object source, EventArgs e) { string strData; string[] Agents; int i; try { strData = Request.Form["chkSelect"]; Agents = strData.Split(new char[] { ',' }); for (i = 0; i < Agents.Length; i++) { if (txtQuoteBy.Text.Trim() != "") { BLL_TRV_QuoteRequest RFQ = new BLL_TRV_QuoteRequest(); if (RFQ.AddRequestForQuote(Convert.ToInt32(RequestID), Convert.ToInt32(Agents[i]), txtQuoteBy.Text + " " + ddlDepHours1.SelectedItem.Text + ":" + ddlDepMins1.SelectedItem.Text, Convert.ToInt32(Session["USERID"].ToString()))) { //BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest(); //BLL_TRV_Supplier objSupplier = new BLL_TRV_Supplier(); //int result; //string msg = "We have posted a travel request for your attention. please have a look and provide your best offer for the same. Regards, SeaChange"; //result = TRequest.SaveEmail("REQUEST FOR QUOTATION", objSupplier.GetSupplierEmail(Convert.ToInt32(Agents[i])), // "", msg, Convert.ToInt32(Session["USERID"])); //TRequest = null; } RFQ = null; } } Response.Write("<script type='text/javascript'>alert('Request for quotation has been sent to " + i.ToString() + " AGENTS'); parent.CloseWindow('SendRFQWID');</script>"); string js = "parent.SendRFQ_Closed();parent.hideModal('dvPopUp');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "closewindow", js, true); } catch { } }
public string Get_Pending_Manager_Approval(string RequestID) { BLL_TRV_QuoteRequest TRequest = new BLL_TRV_QuoteRequest(); return(UDFLib.CreateHtmlTableFromDataTable(TRequest.Get_Pending_Manager_Approval(int.Parse(RequestID)), new string[] { "Pending With" }, new string[] { "name" }, "")); }
protected void cmdApprove_Click(object sender, EventArgs e) { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest(); int result; try { string qid = ""; string QSupplierCode = ""; try { qid = Request.Form["rdQuote"].ToString().Split(',')[0]; QSupplierCode = Request.Form["rdQuote"].ToString().Split(',')[1]; } catch (Exception) { string msgmodal = String.Format("alert('Approver not Selected!');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Approver", msgmodal, true); return; } if (!String.IsNullOrEmpty(qid)) { DataTable dtSuppDate = BLL_PURC_Common.Get_Supplier_ValidDate("'" + QSupplierCode + "'"); if (dtSuppDate.Rows.Count > 0) { if (Convert.ToDateTime(dtSuppDate.Rows[0]["ASL_Status_Valid_till"]) < DateTime.Now) { String msg = String.Format("alert('Selected agent has been expired/blacklisted');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msg451", msg, true); } else { QR.Insert_Approval_Entry(Convert.ToInt32(Session["USERID"].ToString()), Convert.ToInt32(Session["USERID"].ToString()), decimal.Parse(hdf_Totalamount.Value.Trim()), Convert.ToInt32(Request.QueryString["requestid"].ToString()), "", txtApproverRemark.Text, 1, UDFLib.ConvertIntegerToNull(qid)); decimal Approval_limit = QR.Get_Approveal_Limit(Convert.ToInt32(Session["userid"])); //decimal Approval_limit = 1000; if (Approval_limit > 0 && (decimal.Parse(hdf_Totalamount.Value.Trim()) <= Approval_limit)) { int Mail_ID; result = QR.ApproveQuotation(requestID, Convert.ToInt32(qid), Convert.ToInt32(Session["USERID"].ToString()), txtApproverRemark.Text, out Mail_ID); if (result > -1) { //add PO as attachment to mail DataTable dtPO = QR.Get_Generate_PO_PDF(Request.QueryString["requestid"]); if (dtPO.Rows.Count > 0) { string fileName = Convert.ToString(dtPO.Rows[0]["ORDER_CODE"]).Replace('-', '_') + DateTime.Now.ToString("yyMMddss") + ".pdf"; GeneratePOAsPDF(dtPO, fileName, Mail_ID); } if (result > 0) // SQ Flight has been approved { UTF8Encoding utf8 = new UTF8Encoding(); System.Net.WebClient myClient = new System.Net.WebClient(); string currentPageUrl = ConfigurationManager.AppSettings["INVFolderPath"] + "/travel/Evaluation_view.aspx?requestid=" + Request.QueryString["requestid"]; byte[] requestHTML; requestHTML = myClient.DownloadData(currentPageUrl); string ReportPageHTML = utf8.GetString(requestHTML); BLL_Crew_CrewDetails objMail = new BLL_Crew_CrewDetails(); } string msgmodal = String.Format(" alert('Quotation has been approved successfully');self.close();window.opener.location.reload();"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ApprmodalFinalApproved", msgmodal, true); } } else { lstUserList.DataSource = QR.Get_Qtn_Approver(); lstUserList.DataBind(); lstUserList.Items.Insert(0, new ListItem("SELECT", "0")); lstUserList.SelectedIndex = 0; ListItem itemrmv = lstUserList.Items.FindByValue(Session["userid"].ToString()); lstUserList.Items.Remove(itemrmv); string msgmodal = String.Format("showModal('divSendForApproval');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Apprmodal", msgmodal, true); } } } } else { string msgmodal = String.Format(" alert('Please select option to approve'); "); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "optiotoapprove", msgmodal, true); } } catch (Exception ex) { string msgmodal = "alert('" + ex.Message + "');"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "errorex", msgmodal, true); } finally { QR = null; TRequest = null; } }
protected void Page_Load(object sender, EventArgs e) { UserAccessValidation(); if (UDFLib.ConvertToInteger(Request.QueryString["IsPreference"]) == 1) { cmdApprove.Visible = false; } if (Request.QueryString["requestid"] != null) { try { requestID = Convert.ToInt32(Request.QueryString["requestid"].ToString()); ltRequestid.Text = requestID.ToString(); if (!IsPostBack) { BLL_TRV_TravelRequest objT = new BLL_TRV_TravelRequest(); DataTable dtsts = objT.Get_Request_ApprovalStatus(requestID); if (dtsts.Rows.Count > 0) { if (dtsts.Rows[0]["Sent_For_Approval"].ToString() == "1" && dtsts.Rows[0]["currentStatus"].ToString() == "QUOTE RECEIVED") { IsApproving = 1; } } ViewState["ChepeastAmount"] = null; GetTravelRequestDetails(); GetCheapestOptions(); GetQuotationForEvaluation(); BLL_TRV_QuoteRequest objAppHis = new BLL_TRV_QuoteRequest(); gvApprovals.DataSource = objAppHis.Get_Approval_History(requestID); gvApprovals.DataBind(); BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); DataTable dt = QR.Get_Qtn_Approver_DeptMgr(0, 0); lstMngApprList.DataSource = dt; lstMngApprList.DataBind(); lstMngApprList.Items.Insert(0, new ListItem("SELECT", "0")); lstMngApprList.SelectedIndex = 0; ListItem itemrmv = lstMngApprList.Items.FindByValue(Session["userid"].ToString()); lstMngApprList.Items.Remove(itemrmv); ListBoxPOApprover.DataSource = QR.Get_Qtn_Approver(); ListBoxPOApprover.DataBind(); ListBoxPOApprover.Items.Insert(0, new ListItem("SELECT", "0")); ListBoxPOApprover.SelectedIndex = 0; lstMngApprList.Items.Remove(itemrmv); } } catch { } } }
protected void cmdSave_Click(object sender, EventArgs e) { BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest(); IATAList lst = new IATAList(); int QuoteID = 0;; try { if (txtFare.Text.Trim() != "" && txtTax.Text.Trim() != "" && txtTicketDeadline.Text.Trim() != "" && txtGDSLocator.Text.Trim() != "") { if (!string.IsNullOrEmpty(Request.QueryString["QuoteID"])) { QuoteID = Convert.ToInt32(Request.QueryString["QuoteID"]); } QuoteID = Qr.AddQuotation(RequestID, AgentID, txtGDSLocator.Text.Trim(), Convert.ToDateTime(txtTicketDeadline.Text.Trim()), Convert.ToDecimal(txtFare.Text.Trim()), Convert.ToDecimal(txtTax.Text.Trim()), txtPNRText.Text.Trim(), cmbCurrency.SelectedValue, Convert.ToInt32(Session["USERID"].ToString()), cmbHours.SelectedItem.Text, cmbMins.SelectedItem.Text, QuoteID, UDFLib.ConvertDecimalToNull(txtbaggageallowances.Text), UDFLib.ConvertDecimalToNull(txtDateChangeAllow.Text), UDFLib.ConvertDecimalToNull(txtCancellationCharge.Text)); int cnt = 0; foreach (GridViewRow grFlt in GrdFlight.Rows) { int Flight_ID = GrdFlight.DataKeys[grFlt.RowIndex].Values["ID"].ToString().Contains("-") ? 0 : Convert.ToInt32(GrdFlight.DataKeys[grFlt.RowIndex].Values["ID"].ToString()); Qr.AddQuotationFlights(QuoteID, (grFlt.FindControl("txtAirlineLocator") as TextBox).Text, (grFlt.FindControl("txtFrom") as TextBox).Text, (grFlt.FindControl("txtTo") as TextBox).Text, "", (grFlt.FindControl("txtFlight") as TextBox).Text, (grFlt.FindControl("cmbTravelClass") as DropDownList).SelectedValue, Convert.ToDateTime((grFlt.FindControl("txtDeparureDate") as TextBox).Text), Convert.ToDateTime((grFlt.FindControl("txtArrivalDate") as TextBox).Text), (grFlt.FindControl("cmbFlightStatus") as DropDownList).SelectedValue, (grFlt.FindControl("txtFlightRemark") as TextBox).Text, UDFLib.ConvertToInteger(Session["USERID"].ToString()), (grFlt.FindControl("cmbArrHours") as DropDownList).SelectedItem.Value, (grFlt.FindControl("cmbArrMins") as DropDownList).SelectedItem.Value, (grFlt.FindControl("cmbDepHours") as DropDownList).SelectedItem.Value, (grFlt.FindControl("cmbDepMins") as DropDownList).SelectedItem.Value, Flight_ID); lst.fromIATA = (grFlt.FindControl("txtFrom") as TextBox).Text; lst.toIATA = (grFlt.FindControl("txtTo") as TextBox).Text; cnt++; } } string js = "parent.newQuote_Closed();parent.hideModal('dvPopUp');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "closewindow", js, true); } catch { throw; } finally { Qr = null; } }
public string asyncGet_Agents_By_Request(string Request_ID) { BLL_TRV_QuoteRequest objQtnReq = new BLL_TRV_QuoteRequest(); return(UDFLib.CreateHtmlCheckBoxList("htmlchkremark", "hdfhtmlchkremarkcount", objQtnReq.Get_Agents_By_Request(int.Parse(Request_ID)), "SHORT_NAME", "id", "horizontal", 2, "htmlchkremark-css")); }
public string asyncGet_PODetails_ByReqID(string Request_ID, string Supplier_Code) { BLL_TRV_QuoteRequest TRequest = new BLL_TRV_QuoteRequest(); return(UDFLib.CreateHtmlTableFromDataTable(TRequest.Get_PODetails_ByReqID(Request_ID, UDFLib.ConvertStringToNull(Supplier_Code)), new string[] { "PO", "Item Description", "Currency", "Amount" }, new string[] { "ORDER_CODE", "ITEM_SHORT_DESC", "CURRENCY", "AMOUNT" }, new string[] { "left", "left", "center", "right" }, "")); }
protected void rptParent_ItemCommand(object source, RepeaterCommandEventArgs e) { try { if ("SENDTICKET" == e.CommandName) { string UploadFilePath = ConfigurationManager.AppSettings["TRV_UPLOAD_PATH"]; BLL_TRV_Attachment objatt = new BLL_TRV_Attachment(); int MailID = objatt.Send_Ticket(int.Parse(e.CommandArgument.ToString()), int.Parse(Session["userid"].ToString())); string URL = String.Format("window.open('../crew/EmailEditor.aspx?ID=+" + MailID.ToString() + @"&FILEPATH=" + UploadFilePath.Remove(UploadFilePath.Length - 1, 1).Replace(@"\", @"\\") + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "k" + MailID.ToString(), URL, true); } if (e.CommandName == "delete") { BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest(); TRequest.CancelRequest(Convert.ToInt32(e.CommandArgument), Convert.ToInt32(Session["USERID"].ToString())); TRequest = null; ViewState["Status"] = ""; string jsc = @"__doPostBack('ctl00$MainContent$lnkMenu' + currentlink, '')"; // string msgmodal = String.Format("asyncGet_Quote_Count_Approval(" + e.CommandArgument.ToString() + ",'divSendForApproval');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "jsc", jsc, true); } if (e.CommandName == "refund") { hdnRequestID.Value = e.CommandArgument.ToString(); lblRequestIDRefund.Text = "Request ID : " + e.CommandArgument.ToString(); string js = "showModal('dvPopup_Refund');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "jsPopup_Refund", js, true); } if (e.CommandName == "RequestApproval") { BLL_TRV_QuoteRequest QR = new BLL_TRV_QuoteRequest(); ViewState["RequestID_App"] = e.CommandArgument.ToString(); hdnRequestID_App.Value = e.CommandArgument.ToString(); DataTable dt = QR.Get_Qtn_Approver_DeptMgr(0, 0); lstUserList.DataSource = dt; lstUserList.DataBind(); lstUserList.Items.Insert(0, new ListItem("SELECT", "0")); lstUserList.SelectedIndex = 0; ListItem itemrmv = lstUserList.Items.FindByValue(Session["userid"].ToString()); lstUserList.Items.Remove(itemrmv); ListBoxPOApprover.DataSource = QR.Get_Qtn_Approver(); ListBoxPOApprover.DataBind(); ListBoxPOApprover.Items.Insert(0, new ListItem("SELECT", "0")); ListBoxPOApprover.SelectedIndex = 0; lstUserList.Items.Remove(itemrmv); string msgmodal = String.Format("asyncGet_Quote_Count_Approval(" + e.CommandArgument.ToString() + ",'divSendForApproval');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Apprmodal", msgmodal, true); } } catch { } }