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 string GetSuppliers(int spid) { List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); Supplierstbl sps = new Supplierstbl(); SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(sps).ToList(); var supplier = lstSuppliers.OfType <Supplierstbl>().Where(a => a.SupplierID == spid); //return supplier.First().AgencyName; return(supplier.Count() > 0 ? supplier.First().Supplier : ""); }
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 GetSuppliers(int spid) //{ // List<Supplierstbl> lstSuppliers = new List<Supplierstbl>(); // Supplierstbl sps = new Supplierstbl(); // SuppliersBL objSuppliersBL = new SuppliersBL(); // lstSuppliers = objSuppliersBL.GetAllSuppliers(sps).ToList(); // var supplier = lstSuppliers.OfType<Supplierstbl>().Where(a => a.SupplierID == spid); // return supplier.First().AgencyName; //} protected string GetSuppliers() { List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); Supplierstbl sps = new Supplierstbl(); SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(sps).ToList(); foreach (var cnt in lstSuppliers) { sps.Supplier = cnt.Supplier; } return(sps.Supplier); }
protected void GetSupplier() { List <Supplierstbl> lstSupplier = new List <Supplierstbl>(); Supplierstbl sup = new Supplierstbl(); SuppliersBL objsupBL = new SuppliersBL(); sup.IsActive = 1; lstSupplier = objsupBL.GetSuppliersByStatus(sup).ToList(); foreach (var cnt in lstSupplier) { ListItem li = new ListItem(); li.Text = cnt.Supplier; li.Value = cnt.SupplierID.ToString(); ddlSupplierID.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 GetEmployee() //{ // List<Employeetbl> lstEmployee = new List<Employeetbl>(); // Employeetbl epy = new Employeetbl(); // EmployeeBL objEmployeeBL = new EmployeeBL(); // //bks.Status = 1.ToString(); // lstEmployee = objEmployeeBL.GetAllEmployee(epy).ToList(); // ListItem e = new ListItem(); // e.Text = "--Select--"; // e.Value = 0.ToString(); // ddlStaff.Items.Add(e); // foreach (var ept in lstEmployee) // { // ListItem ep = new ListItem(); // ep.Text = ept.FirstName + " " + ept.LastName; // ep.Value = ept.EmpId.ToString(); // ddlStaff.Items.Add(ep); // } //} protected void GetSuppliers() { List<Supplierstbl> lstSuppliers = new List<Supplierstbl>(); Supplierstbl sps = new Supplierstbl(); SuppliersBL objSuppliersBL = new SuppliersBL(); //bks.Status = 1.ToString(); lstSuppliers = objSuppliersBL.GetAllSuppliers(sps).ToList(); ListItem s = new ListItem(); s.Text = "--Select--"; s.Value = 0.ToString(); ddlStaff.Items.Add(s); foreach (var spt in lstSuppliers) { ListItem sp = new ListItem(); sp.Text = spt.Supplier; sp.Value = spt.SupplierID.ToString(); ddlStaff.Items.Add(sp); } }
protected void GetSuppliersById(int SuppliersID) { Supplierstbl Sup = new Supplierstbl { SupplierID = SuppliersID }; List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); lstSuppliers = objSuppliersBL.GetSuppliersById(Sup).ToList(); foreach (var el in lstSuppliers) { txtSupplier.Text = el.Supplier; txtEmail.Text = el.Email; txtName.Text = el.PersonName; txtMobile.Text = el.MobileNo; txtAddress.Text = el.Address; txtAPDate.Text = Convert.ToDateTime(el.ApiPurchaseDate).ToShortDateString(); txtAPValue.Text = el.ApiPurchaseValue; txtAPIKey.Text = el.ApiKey; txtALink.Text = el.AgentLink; txtSupplierCode.Text = el.SupplierCode; txtUserName.Text = el.UserName; txtPassword.Text = el.Password; txtAccounts.Text = el.AcntName; txtOperationsName.Text = el.OperationName; txtManagementName.Text = el.MngmtName; txtAEmail.Text = el.AcntEmail; txtOEmail.Text = el.OperationEmail; txtMEmail.Text = el.MngmtEmail; txtANumber.Text = el.AcntNumber; txtONumber.Text = el.OperationNumber; txtMNumber.Text = el.MngmtNumber; hdnSupplierID.Value = el.SupplierID.ToString(); //hdnAddress.Value = el.Address; //hdnAgentLink.Value = el.AgentLink; //hdnAgentCode.Value = el.AgentCode; //hdnUserName.Value = el.UserName; //hdnPassword.Value = el.Password; } }
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[5].Text; Supplierstbl cnt = new Supplierstbl(); cnt.SupplierID = Convert.ToInt32(gvr.Cells[0].Text); if (id == "Active") { cnt.IsActive = 0; } else if (id == "InActive") { cnt.IsActive = 1; } objSuppliersBL.UpdateSuppliersIsActive(cnt); GetSuppliers(); }
protected void GetSuppliers() { List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); Supplierstbl sup = new Supplierstbl(); SuppliersBL objSuppliersBL = new SuppliersBL(); sup.IsActive = 1; lstSuppliers = objSuppliersBL.GetSuppliersByStatus(sup).ToList(); ddlToAccount.Items.Clear(); ListItem m = new ListItem(); m.Text = "--Select--"; m.Value = 0.ToString(); ddlToAccount.Items.Add(m); foreach (var cntt in lstSuppliers) { ListItem la = new ListItem(); la.Text = cntt.Supplier; la.Value = cntt.SupplierID.ToString(); ddlToAccount.Items.Add(la); } }
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(); } }
protected void BtnSave_Click(object sender, EventArgs e) { Supplierstbl ls = new Supplierstbl { Supplier = txtSupplier.Text, PersonName = txtName.Text, Email = txtEmail.Text, MobileNo = txtMobile.Text, Address = txtAddress.Text, ApiPurchaseDate = txtDate.Text, ApiKey = txtAPIKey.Text, ApiPurchaseValue = txtAPValue.Text, AgentLink = txtALink.Text, SupplierCode = txtSupplierCode.Text, UserName = txtUserName.Text, Password = txtPassword.Text, AcntName = txtAName.Text, AcntEmail = txtAEmail.Text, AcntNumber = txtANumber.Text, OperationName = txtOperationsName.Text, OperationEmail = txtOEmail.Text, OperationNumber = txtONumber.Text, MngmtName = txtManagementName.Text, MngmtEmail = txtMEmail.Text, MngmtNumber = txtMNumber.Text, IsActive = 1, CreatedBy = 1, CreatedDate = DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss") }; List <Supplierstbl> lst = new List <Supplierstbl>(); lst = objSuppliersBL.SaveSuppliers(ls).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Suppliers Saved Successfully');", true); Clear(); Response.Redirect("SuppliersList.aspx"); }
protected void GetSuppliersById(int SuppliersID) { Supplierstbl Sup = new Supplierstbl { SupplierID = SuppliersID }; List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); lstSuppliers = objSuppliersBL.GetSuppliersById(Sup).ToList(); foreach (var el in lstSuppliers) { hdnSupplierID.Value = el.SupplierID.ToString(); lblGRNConnect.Text = el.Supplier; lblSEmail.Text = el.Email; lblNam.Text = el.PersonName; lblSMobile.Text = el.MobileNo; lblAdd.Text = el.Address; lblAgntLnk.Text = el.AgentLink; lblAgntCd.Text = el.SupplierCode; lblUN.Text = el.UserName; lblPasswrd.Text = el.Password; lblAPDate.Text = Convert.ToDateTime(el.ApiPurchaseDate).ToShortDateString(); lblAPValue.Text = el.ApiPurchaseValue; lblApiKey.Text = el.ApiKey; txtAName.Text = el.AcntName; txtOperationsName.Text = el.OperationName; txtManagementName.Text = el.MngmtName; txtAEmail.Text = el.AcntEmail; txtOEmail.Text = el.OperationEmail; txtMEmail.Text = el.MngmtEmail; txtANumber.Text = el.AcntNumber; txtONumber.Text = el.OperationNumber; txtMNumber.Text = el.MngmtNumber; } }
protected string GetSuppliers(int spid) { List <Supplierstbl> lstSuppliers = new List <Supplierstbl>(); Supplierstbl sps = new Supplierstbl(); SuppliersBL objSuppliersBL = new SuppliersBL(); sps.IsActive = 1; lstSuppliers = objSuppliersBL.GetSuppliersByStatus(sps).ToList(); ListItem l = new ListItem(); l.Text = "--Select--"; l.Value = 0.ToString(); ddlToAccount.Items.Add(l); foreach (var cnt in lstSuppliers) { ListItem li = new ListItem(); li.Text = cnt.Supplier; li.Value = cnt.SupplierID.ToString(); ddlToAccount.Items.Add(li); } var suppliers = lstSuppliers.OfType <Supplierstbl>().Where(a => a.SupplierID == spid); return(suppliers.Count() > 0 ? suppliers.First().Supplier : ""); }
protected void BtnUpdate_Click(object sender, EventArgs e) { Supplierstbl Sup = new Supplierstbl(); Sup.SupplierID = Convert.ToInt32(hdnSupplierID.Value); Sup.Address = txtAddress.Text; Sup.AgentLink = txtALink.Text; Sup.SupplierCode = txtSupplierCode.Text; Sup.UserName = txtUserName.Text; Sup.Password = txtPassword.Text; Sup.Supplier = txtSupplier.Text; Sup.PersonName = txtName.Text; Sup.Email = txtEmail.Text; Sup.MobileNo = txtMobile.Text; Sup.ApiPurchaseDate = Convert.ToDateTime(txtAPDate.Text).ToString("yyyy-MM-dd"); Sup.ApiKey = txtAPIKey.Text; Sup.ApiPurchaseValue = txtAPValue.Text; Sup.AcntName = txtAccounts.Text; Sup.AcntEmail = txtAEmail.Text; Sup.AcntNumber = txtANumber.Text; Sup.OperationName = txtOperationsName.Text; Sup.OperationEmail = txtOEmail.Text; Sup.OperationNumber = txtONumber.Text; Sup.MngmtName = txtManagementName.Text; Sup.MngmtEmail = txtMEmail.Text; Sup.MngmtNumber = txtMNumber.Text; List <Supplierstbl> lst = new List <Supplierstbl>(); Sup.IsActive = 1; Sup.UpdatedBy = 1; Sup.UpdatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); objSuppliersBL.UpdateSuppliers(Sup).ToList(); ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Suppliers Updated Successfully');", true); Clear(); Response.Redirect("SuppliersList.aspx"); }
public IEnumerable <Supplierstbl> UpdateSuppliersStatus(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(7, ls)); }
public IEnumerable <Booking> GetAllBookingsWithSearch(AllBookingstbl ls, Gueststbl gs, Hotelstbl hs, Roomstbl rs, Supplierstbl sp, Agentstbl ag) { return(objAllBookingsDA.AllBookingsWithSearch(1, ls, gs, hs, rs, sp, ag)); }
public IEnumerable <Booking> UpdateAllBookingsStatus(AllBookingstbl ls, Gueststbl gs, Hotelstbl hs, Roomstbl rs, Supplierstbl sp, Agentstbl ag) { return(objAllBookingsDA.AllBookings(7, ls, gs, hs, rs, sp, ag)); }
public IEnumerable <Supplierstbl> UpdateSuppliersIsActive(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(6, ls)); }
public IEnumerable <Supplierstbl> GetSuppliersByStatus(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(8, ls)); }
public IEnumerable <Supplierstbl> GetSuppliersById(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(2, ls)); }
public IEnumerable <Supplierstbl> SaveSuppliers(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(3, ls)); }
public IEnumerable <Supplierstbl> GetAllSuppliers(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(1, ls)); }
public IEnumerable <Supplierstbl> DeleteSuppliers(Supplierstbl ls) { return(objSuppliersDA.SuppliersAll(5, ls)); }