private void UpdateMarkUpValues() { try { int UserId = Convert.ToInt32(Session["loginId"]); int BranchId = Convert.ToInt32(Session["BranchId"]); int CompanyId = Convert.ToInt32(Session["CompanyId"]); FlightMarkUpMaster ojbFlightMarkUpMasterAll = new FlightMarkUpMaster(); ojbFlightMarkUpMasterAll.MarkUpId = Convert.ToInt32(hfAllAirlineMarkupId.Value); ojbFlightMarkUpMasterAll.AirLineCode = "ALL"; ojbFlightMarkUpMasterAll.MarkUpType = 1; // Fixed On Percentage ojbFlightMarkUpMasterAll.MarkUpValue = Convert.ToDecimal(txtAllAirLineMarkupValue.Text); ojbFlightMarkUpMasterAll.MarkUpTripType = 1; // International or Domastic ojbFlightMarkUpMasterAll.MarkUpOn = 1; // Class Or AirLine Code ojbFlightMarkUpMasterAll.ClassCode = ""; ojbFlightMarkUpMasterAll.SegmentLevel = false; ojbFlightMarkUpMasterAll.PassengerLevel = false; ojbFlightMarkUpMasterAll.CreatedBy = UserId; ojbFlightMarkUpMasterAll.CompanyId = CompanyId; ojbFlightMarkUpMasterAll.BranchId = BranchId; ojbFlightMarkUpMasterAll.UserId = UserId; ojbFlightMarkUpMasterAll.Status = 1; ojbFlightMarkUpMasterAll.EmployeeCategory = ddlEmployeeCategory.SelectedValue; objBaFlightSearch.InsertUpdateMarkUpSetup(ojbFlightMarkUpMasterAll); foreach (GridViewRow row in gdvFlightMarkUp.Rows) { HiddenField hfMarkUpId = row.Cells[1].Controls[1] as HiddenField; HiddenField hfAirLinecode = row.Cells[1].Controls[3] as HiddenField; TextBox txtMarkupValue = row.Cells[3].Controls[1] as TextBox; DropDownList ddlMarkuptype = row.Cells[2].Controls[1] as DropDownList; FlightMarkUpMaster ojbFlightMarkUpMaster = new FlightMarkUpMaster(); ojbFlightMarkUpMaster.MarkUpId = Convert.ToInt32(hfMarkUpId.Value); ojbFlightMarkUpMaster.AirLineCode = hfAirLinecode.Value; ojbFlightMarkUpMaster.MarkUpType = Convert.ToInt32(ddlMarkuptype.SelectedValue); // Fixed On Percentage ojbFlightMarkUpMaster.MarkUpValue = Convert.ToDecimal(txtMarkupValue.Text); ojbFlightMarkUpMaster.MarkUpTripType = 1; // International or Domastic ojbFlightMarkUpMaster.MarkUpOn = 1; // Class Or AirLine Code ojbFlightMarkUpMaster.ClassCode = ""; ojbFlightMarkUpMaster.SegmentLevel = false; ojbFlightMarkUpMaster.PassengerLevel = false; ojbFlightMarkUpMaster.CreatedBy = UserId; ojbFlightMarkUpMaster.CompanyId = CompanyId; ojbFlightMarkUpMaster.BranchId = BranchId; ojbFlightMarkUpMaster.UserId = UserId; ojbFlightMarkUpMaster.Status = 1; ojbFlightMarkUpMaster.EmployeeCategory = ddlEmployeeCategory.SelectedValue; objBaFlightSearch.InsertUpdateMarkUpSetup(ojbFlightMarkUpMaster); } BindAirLineList(); } catch (Exception ex) { } }
private void InsertInternationalMarkup() { try { int UserId = Convert.ToInt32(Session["loginId"]); int BranchId = Convert.ToInt32(Session["BranchId"]); int CompanyId = Convert.ToInt32(Session["CompanyId"]); FlightMarkUpMaster ojbFlightMarkUpMaster = new FlightMarkUpMaster(); ojbFlightMarkUpMaster.MarkUpId = Convert.ToInt32(hfMarkUpId.Value); ojbFlightMarkUpMaster.AirLineCode = ""; ojbFlightMarkUpMaster.MarkUpType = Convert.ToInt32(ddlMarkUptype.SelectedValue); // Fixed On Percentage ojbFlightMarkUpMaster.MarkUpValue = Convert.ToDecimal(txtMarkUpValue.Text); ojbFlightMarkUpMaster.MarkUpTripType = 2; // International or Domastic ojbFlightMarkUpMaster.MarkUpOn = 2; ojbFlightMarkUpMaster.ClassCode = ddlClass.SelectedValue; ojbFlightMarkUpMaster.SegmentLevel = chkSegmentLevel.Checked; ojbFlightMarkUpMaster.PassengerLevel = chkPassengerLevel.Checked; ojbFlightMarkUpMaster.CreatedBy = UserId; ojbFlightMarkUpMaster.CompanyId = CompanyId; ojbFlightMarkUpMaster.BranchId = BranchId; ojbFlightMarkUpMaster.UserId = UserId; ojbFlightMarkUpMaster.Status = 1; objBaFlightSearch.InsertUpdateMarkUpSetup(ojbFlightMarkUpMaster); labelError.Text = objBoutility.ShowMessage("success", "success", "Action Completed"); } catch (Exception ex) { labelError.Text = objBoutility.ShowMessage("danger", "Error", ex.Message); } }
private void MoveRight() { try { int UserId = Convert.ToInt32(Session["loginId"]); int BranchId = Convert.ToInt32(Session["BranchId"]); int CompanyId = Convert.ToInt32(Session["CompanyId"]); foreach (GridViewRow row in gdvAirLineCodes.Rows) { CheckBox chk = row.Cells[0].Controls[1] as CheckBox; HiddenField hf = row.Cells[0].Controls[3] as HiddenField; if (chk.Checked == true) { FlightMarkUpMaster ojbFlightMarkUpMaster = new FlightMarkUpMaster(); ojbFlightMarkUpMaster.MarkUpId = 0; ojbFlightMarkUpMaster.AirLineCode = hf.Value; ojbFlightMarkUpMaster.MarkUpType = 1; // Fixed On Percentage ojbFlightMarkUpMaster.MarkUpValue = 0; ojbFlightMarkUpMaster.MarkUpTripType = 1; // International or Domastic ojbFlightMarkUpMaster.MarkUpOn = 1; // Class Or AirLine Code ojbFlightMarkUpMaster.ClassCode = ""; ojbFlightMarkUpMaster.SegmentLevel = false; ojbFlightMarkUpMaster.PassengerLevel = false; ojbFlightMarkUpMaster.CreatedBy = UserId; ojbFlightMarkUpMaster.CompanyId = CompanyId; ojbFlightMarkUpMaster.BranchId = BranchId; ojbFlightMarkUpMaster.UserId = UserId; ojbFlightMarkUpMaster.Status = 1; ojbFlightMarkUpMaster.EmployeeCategory = ddlEmployeeCategory.SelectedValue; objBaFlightSearch.InsertUpdateMarkUpSetup(ojbFlightMarkUpMaster); } } BindAirLineList(); } catch (Exception ex) { } }