protected string GetAgents(int agid) { List <Agentstbl> lstAgents = new List <Agentstbl>(); Agentstbl ags = new Agentstbl(); AgentsBL objAgentsBL = new AgentsBL(); ags.Status = 1; lstAgents = objAgentsBL.GetAgentsByStatus(ags).ToList(); ListItem l = new ListItem(); l.Text = "--Select--"; l.Value = 0.ToString(); ddlFromAccount.Items.Add(l); foreach (var cnt in lstAgents) { ListItem li = new ListItem(); li.Text = cnt.AgencyName; li.Value = cnt.AgentID.ToString(); ddlFromAccount.Items.Add(li); } var agent = lstAgents.OfType <Agentstbl>().Where(a => a.AgentID == agid); //return agent.First().AgencyName; return(agent.Count() > 0 ? agent.First().AgencyName : ""); }
protected void lbtnAMarkAsActive_Click(object sender, EventArgs e) { LinkButton lbtn = (LinkButton)sender; GridViewRow gvr = (GridViewRow)lbtn.NamingContainer; var s = lbtn.Text.Split('>'); var val = gvr.DataItemIndex; var id = gvr.Cells[7].Text; Agentstbl at = new Agentstbl(); at.AgentID = Convert.ToInt32(gvr.Cells[0].Text); if (s[2] == "Mark As InActive") { at.Status = 0; } else if (s[2] == "Mark As Active") { at.Status = 1; } else if (s[2] == "Hold") { at.Status = 2; } // id.Split("</li>"); objagBL.UpdateAgentStatus(at); GetAgents(); }
protected void GetAllBookingsById(int BookingDetailsId) { AllBookingstbl ls = new AllBookingstbl { BookingDetailsId = BookingDetailsId }; Hotelstbl hs = new Hotelstbl(); Gueststbl gs = new Gueststbl(); Roomstbl rs = new Roomstbl(); Supplierstbl sp = new Supplierstbl(); Agentstbl ag = new Agentstbl(); lstAllBookings = objAllBookingsBL.GetAllBookingsById(ls, gs, hs, rs, sp, ag).ToList(); foreach (var el in lstAllBookings) { lblBID.Text = el.AllBookingstc.SupBookingId; lblDate.Text = Convert.ToDateTime(el.AllBookingstc.BookingDate).ToShortDateString(); lblSName.Text = el.Supplierstc.Supplier; lblRec.Text = el.Supplierstc.ToString(); lblAgencyName.Text = el.Agentstc.AgencyName; lblAgencyCNo.Text = el.Agentstc.MobileNo; lblCancel.Text = el.Agentstc.ToString(); lblDeadlineDate.Text = el.Agentstc.ToString(); lblABID.Text = el.AllBookingstc.AgentBookingId; lblHName.Text = el.Hotelstc.HotelName; lblCNo.Text = el.Hotelstc.ContactNumber; lblAdrs.Text = el.Hotelstc.HotelAddress; lblLctn.Text = el.Hotelstc.ToString(); lblCheckInDate.Text = Convert.ToDateTime(el.AllBookingstc.CheckinDate).ToShortDateString(); lblCheckOutDate.Text = Convert.ToDateTime(el.AllBookingstc.ChekoutDate).ToShortDateString(); } //GetAllBookingsById(30); }
protected void GetAllBookings() { AllBookingstbl ls = new AllBookingstbl(); Hotelstbl hs = new Hotelstbl(); Gueststbl gs = new Gueststbl(); Roomstbl rs = new Roomstbl(); Supplierstbl sp = new Supplierstbl(); Agentstbl ag = new Agentstbl(); //Booking Bok = new Booking(); List <Booking> lstBok = new List <Booking>(); lstBok = objAllBookingsBL.GetAllBookings(ls, gs, hs, rs, sp, ag).ToList(); gdvAllBookings.DataSource = lstBok; gdvAllBookings.DataBind(); GridView1.DataSource = lstBok; GridView1.DataBind(); decimal Total = 0; foreach (var vl in lstBok) { Total += Convert.ToDecimal(vl.AllBookingstc.NoofRooms) * Convert.ToDecimal(vl.AllBookingstc.AgentPrice); } lblTotalAmount.Text = Total.ToString(); }
protected void UpdateAgentCode() { Agentstbl at = new Agentstbl(); at.AgentID = Convert.ToInt32(hdnAgentID.Value); at.AgencyCode = "MFB" + at.AgentID; at.MfbStaff = ddlEmployee.SelectedValue; List <Agentstbl> agl = new List <Agentstbl>(); agl = objRegBL.UpdateAgentCode(at).ToList(); }
protected string GetAgents(int agid) { List <Agentstbl> lstAgents = new List <Agentstbl>(); Agentstbl ags = new Agentstbl(); AgentsBL objAgentsBL = new AgentsBL(); lstAgents = objAgentsBL.GetAllAgents(ags).ToList(); var agent = lstAgents.OfType <Agentstbl>().Where(a => a.AgentID == agid); //return agent.First().AgencyName; return(agent.Count() > 0 ? agent.First().AgencyName : ""); }
protected void lbtnAHold_Click(object sender, EventArgs e) { LinkButton lbtn = (LinkButton)sender; GridViewRow gvr = (GridViewRow)lbtn.NamingContainer; var val = gvr.DataItemIndex; var id = gvr.Cells[7].Text; Agentstbl at = new Agentstbl(); at.AgentID = Convert.ToInt32(gvr.Cells[0].Text); at.Status = 2; objagBL.UpdateAgentStatus(at); GetAgents(); }
//protected override void OnLoad(EventArgs e) //{ // base.OnLoad(e); //} protected void GetAgents() { Agentstbl ags = new Agentstbl(); List <Agentstbl> lstags = new List <Agentstbl>(); RegistrationBL objRegBL = new RegistrationBL(); lstags = objRegBL.GetAllAgents(ags).ToList(); ddlAgency.Items.Clear(); ddlAgency.Items.Add(new ListItem("--Select--", "0")); foreach (var ag in lstags) { ddlAgency.Items.Add(new ListItem(ag.AgencyName, ag.AgentID.ToString())); } }
protected void btnSave_Click(object sender, EventArgs e) { Agentstbl st = new Agentstbl(); st.AgentID = Convert.ToInt32(DDLAgency.SelectedValue); st.PayNow = Convert.ToInt32(DDLPaynow.SelectedValue); st.ConfirmBooking = Convert.ToInt32(DDLCBooking.SelectedValue); st.OfflineRequest = Convert.ToInt32(DDLORequest.SelectedValue); st.UpdatedBy = 1; st.UpdatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); Lag = objagBL.UpdateAgentPayOffineSettings(st).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Agents saved Successfully');", true); btnUpdate.Visible = false; }
protected void GetAllBookings() { AllBookingstbl ls = new AllBookingstbl(); Hotelstbl hs = new Hotelstbl(); Gueststbl gs = new Gueststbl(); Roomstbl rs = new Roomstbl(); Supplierstbl sp = new Supplierstbl(); Agentstbl ag = new Agentstbl(); //Booking Bok = new Booking(); lstBok = objAllBookingsBL.GetAllBookingsWithSearch(ls, gs, hs, rs, sp, ag).ToList(); gdvAllBookings.DataSource = lstBok; gdvAllBookings.DataBind(); }
protected string GetAgents() { List <Agentstbl> lstAgents = new List <Agentstbl>(); Agentstbl ags = new Agentstbl(); AgentsBL objAgentsBL = new AgentsBL(); lstAgents = objAgentsBL.GetAllAgents(ags).ToList(); foreach (var cnt in lstAgents) { ags.AgencyName = cnt.AgencyName; } return(ags.AgencyName); }
protected void btnReject_Click1(object sender, EventArgs e) { Agentstbl at = new Agentstbl(); at.AgentID = Convert.ToInt32(hdnAgentID.Value); at.Status = 0; // at.IsActive = 1; List <Agentstbl> lst = new List <Agentstbl>(); lst = objRegBL.UpdateAgentStatus(at).ToList(); Response.Redirect("Registrations.aspx"); btnReject.Visible = false; }
protected void GetAgents() { AgentsBL objAgentBL = new AgentsBL(); List <Agentstbl> lstAgent = new List <Agentstbl>(); Agentstbl Agt = new Agentstbl(); Agt.IsActive = 1; lstAgent = objAgentBL.GetAllAgents(Agt).ToList(); foreach (var cnt in lstAgent) { ListItem li = new ListItem(); li.Text = cnt.AgencyName; li.Value = cnt.AgentID.ToString(); } }
protected void btnUpdate_Click1(object sender, EventArgs e) { Agentstbl Agn = new Agentstbl(); Agn.AgentID = Convert.ToInt32(hdnAgentID.Value); Agn.Commission = txtCommission1.Text; Agn.UpdatedBy = 1; Agn.UpdatedDate = DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss"); List <Agentstbl> lst = new List <Agentstbl>(); lst = objagBL.UpdateAgentCommission(Agn).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Agent Updated Successfully');", true); GetDocuments(Convert.ToInt32(hdnAgentID.Value)); }
protected void GetAgency() { List <Agentstbl> lstAgents = new List <Agentstbl>(); Agentstbl agt = new Agentstbl(); RegistrationBL objRegBL = new RegistrationBL(); lstAgents = objRegBL.GetAllAgents(agt).ToList(); ddlAgency.Items.Clear(); foreach (var el in lstAgents) { ListItem li = new ListItem(); li.Text = el.AgencyName; li.Value = el.AgentID.ToString(); ddlAgency.Items.Add(li); } }
protected void GetAllBookingsById(int id) { AllBookingstbl ls = new AllBookingstbl(); Hotelstbl hs = new Hotelstbl(); Gueststbl gs = new Gueststbl(); Roomstbl rs = new Roomstbl(); Supplierstbl sp = new Supplierstbl(); Agentstbl ag = new Agentstbl(); List<Booking> lstAllBookings = new List<Booking>(); lstAllBookings = objAllBookingsBL.GetAllBookingsById(ls, gs, hs, rs, sp, ag).ToList(); foreach (var el in lstAllBookings) { } }
protected void UpdateStatus() { Agentstbl at = new Agentstbl(); at.AgentID = Convert.ToInt32(hdnAgentID.Value); at.AgencyCode = "MFB" + at.AgentID; at.UserName = lblAEmail.Text; at.Password = System.Web.Security.Membership.GeneratePassword(6, 2); at.Status = 1; at.IsActive = 1; List <Agentstbl> lst = new List <Agentstbl>(); lst = objRegBL.UpdateAgentIsActive(at).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Agent Approved Updated Successfully');", true); Response.Redirect("Registration.aspx"); btnReject.Visible = false; }
protected void GetAgents() { List<Agentstbl> lstAgents = new List<Agentstbl>(); Agentstbl ags = new Agentstbl(); AgentsBL objAgentsBL = new AgentsBL(); //ags.Status = "1"; lstAgents = objAgentsBL.GetAllAgents(ags).ToList(); ListItem m = new ListItem(); m.Text = "--Select--"; m.Value = 0.ToString(); ddlAgent.Items.Add(m); foreach (var cntt in lstAgents) { ListItem la = new ListItem(); la.Text = cntt.AgencyName; la.Value = cntt.AgentID.ToString(); ddlAgent.Items.Add(la); } }
protected void lbtnSMarkAsActive_Click(object sender, EventArgs e) { LinkButton lbtn = (LinkButton)sender; GridViewRow gvr = (GridViewRow)lbtn.NamingContainer; var val = gvr.DataItemIndex; var id = gvr.Cells[7].Text; Agentstbl st = new Agentstbl(); st.AgentID = Convert.ToInt32(gvr.Cells[0].Text); if (id == "Active") { st.IsActive = 0; } else if (id == "InActive") { st.IsActive = 1; } objagBL.UpdateAgentIsActive(st); GetAgency(); }
protected void GetAgencyReject() { Agentstbl agt = new Agentstbl(); List <Agentstbl> lstAgent = new List <Agentstbl>(); RegistrationBL objagBL = new RegistrationBL(); agt.IsActive = 0; agt.Status = 0; lstAgent = objagBL.GetRejAgents(agt).ToList(); if (lst.Count() >= 1) { gdvReject.DataSource = lstAgent; gdvReject.DataBind(); } else { DataTable dt = new DataTable(); gdvReject.DataSource = dt; gdvReject.DataBind(); } }
protected void GetAgentName(string RoleId) { ddlName.Items.Clear(); List <Agentstbl> lstAgents = new List <Agentstbl>(); Agentstbl agt = new Agentstbl(); //agt.AgentID = 1; AgentsBL objAgentsBL = new AgentsBL(); lstAgents = objAgentsBL.GetAllAgents(agt).ToList(); ListItem l = new ListItem(); l.Text = "--Select--"; l.Value = 0.ToString(); ddlName.Items.Add(l); foreach (var em in lstAgents) { ListItem li = new ListItem(); li.Text = em.FirstName + ' ' + em.LastName; li.Value = em.AgentID.ToString(); ddlName.Items.Add(li); } }
protected void GetGuestName() { AllBookingsBL objGuestDetailsBL = new AllBookingsBL(); List <Booking> lstBook = new List <Booking>(); List <GuestDetailstbl> lstGuestDetails = new List <GuestDetailstbl>(); AllBookingstbl abt = new AllBookingstbl(); Gueststbl gt = new Gueststbl(); Hotelstbl ht = new Hotelstbl(); Roomstbl rt = new Roomstbl(); Supplierstbl st = new Supplierstbl(); Agentstbl at = new Agentstbl(); GuestDetailstbl Cust = new GuestDetailstbl(); Cust.Status = 1; lstBook = objGuestDetailsBL.GetAllBookings(abt, gt, ht, rt, st, at).ToList(); foreach (var cnt in lstBook) { ListItem li = new ListItem(); li.Text = cnt.Gueststc.FirstName + ' ' + cnt.Gueststc.LastName; li.Value = cnt.Gueststc.GuestId.ToString(); } }
protected void GetHotelName() { AllBookingsBL objHotelBL = new AllBookingsBL(); List <Booking> lstBook = new List <Booking>(); List <HotelDetailstbl> lstHotel = new List <HotelDetailstbl>(); HotelDetailstbl Htl = new HotelDetailstbl(); AllBookingstbl abt = new AllBookingstbl(); Gueststbl gt = new Gueststbl(); Hotelstbl ht = new Hotelstbl(); Roomstbl rt = new Roomstbl(); Supplierstbl st = new Supplierstbl(); Agentstbl at = new Agentstbl(); GuestDetailstbl Cust = new GuestDetailstbl(); Htl.IsActive = 1; lstBook = objHotelBL.GetAllBookings(abt, gt, ht, rt, st, at).ToList(); foreach (var cnt in lstHotel) { ListItem li = new ListItem(); li.Text = cnt.HotelName; li.Value = cnt.HotelDetailsId.ToString(); } }
public IEnumerable <Agentstbl> GetAgentByIsActive(Agentstbl at) { return(objRegistrationDA.AgentsAll(10, at)); }
public IEnumerable <Agentstbl> UpdateAgentStatusAge(Agentstbl at) { return(objRegistrationDA.AgentsAll(9, at)); }
public IEnumerable <Agentstbl> UpdateAgentCommission(Agentstbl at) { return(objRegistrationDA.AgentsAll(8, at)); }
public IEnumerable <Agentstbl> UpdateAgentPayOffineSettings(Agentstbl at) { return(objRegistrationDA.AgentsAll(7, at)); }
public IEnumerable <Agentstbl> UpdateAgentMaxID(Agentstbl at) { return(objRegistrationDA.AgentsAll(6, at)); }
public IEnumerable <Agentstbl> UpdateAgentIsActive(Agentstbl at) { return(objRegistrationDA.AgentsAll(4, at)); }
public IEnumerable <Agentstbl> InsertAgents(Agentstbl at) { return(objRegistrationDA.AgentsAll(3, at)); }