protected void Page_Load(object sender, EventArgs e) { BankBL objBankBL = new BankBL(); lstBank = objBankBL.GetAllBanks(cnt).ToList(); SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList(); MajorAccountBL objMajorAccountBL = new MajorAccountBL(); lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList(); MinorAccountBL objMinorAccountBL = new MinorAccountBL(); lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList(); if (!IsPostBack) { if (Session["PaymentID"].ToString() != null) { int PaymentID = Convert.ToInt32(Session["PaymentID"]); GetPaymentsByID(PaymentID); } } }
protected void Page_Load(object sender, EventArgs e) { SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList(); if (!IsPostBack) { GetPayments(); } }
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 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 GetSuppliers() { SuppliersBL objSupBL = new SuppliersBL(); List <Supplierstbl> lstsupl = new List <Supplierstbl>(); Supplierstbl sup = new Supplierstbl(); sup.IsActive = 1; lstsupl = objSupBL.GetAllSuppliers(sup).ToList(); foreach (var cnt in lstsupl) { ListItem li = new ListItem(); li.Text = cnt.Supplier; li.Value = cnt.SupplierID.ToString(); ddlSupplier.Items.Add(li); } }
//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 GetSuppliers() { List <Supplierstbl> lstSup = new List <Supplierstbl>(); lstSup = objSuppliersBL.GetAllSuppliers(sup).ToList(); if (lstSup.Count() >= 1) { gdvSuppliers.DataSource = lstSup; gdvSuppliers.DataBind(); } else { DataTable dt = new DataTable(); gdvSuppliers.DataSource = dt; gdvSuppliers.DataBind(); } //gdvSuppliers.DataSource = lstSup; //gdvSuppliers.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { AgentsBL objAgentsBL = new AgentsBL(); lstAgents = objAgentsBL.GetAllAgents(cntt).ToList(); BookingDetailsBL objBookingDetailsBL = new BookingDetailsBL(); lstBookings = objBookingDetailsBL.GetAllBooking(bdt).ToList(); //EmployeeBL objEmployeeBL = new EmployeeBL(); //lstEmployee = objEmployeeBL.GetAllEmployee(ept).ToList(); SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(spt).ToList(); if (!IsPostBack) { GetAllBookings(); GetAgents(); GetBookingDetails(); //GetEmployee(); GetSuppliers(); } }
protected void Page_Load(object sender, EventArgs e) { BankBL objBankBL = new BankBL(); lstBank = objBankBL.GetAllBanks(cnt).ToList(); SuppliersBL objSuppliersBL = new SuppliersBL(); lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList(); MajorAccountBL objMajorAccountBL = new MajorAccountBL(); lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList(); MinorAccountBL objMinorAccountBL = new MinorAccountBL(); lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList(); if (!IsPostBack) { divPM.Visible = false; divCheque.Visible = false; divDD.Visible = false; divBank.Visible = false; divCard.Visible = false; divTD.Visible = false; divRN.Visible = false; //divCheque.Attributes.Remove("class"); //divDD.Attributes.Remove("class"); //divBank.Attributes.Remove("class"); //divCard.Attributes.Remove("class"); //divTD.Attributes.Remove("class"); //divRN.Attributes.Remove("class"); lblPaymentMode.Visible = false; ddlPaymentMode.Visible = false; lblChequeNo.Visible = false; txtChequeNo.Visible = false; lblChequeDate.Visible = false; txtChequeDate.Visible = false; lblAcNO.Visible = false; txtAcNo.Visible = false; lblDDNo.Visible = false; txtDDNo.Visible = false; lblDDDate.Visible = false; txtDDDate.Visible = false; lblBankName.Visible = false; txtBankName.Visible = false; lblCardNo.Visible = false; txtCardNo.Visible = false; lblTransactionDate.Visible = false; txtTransactionDate.Visible = false; lblReferenceNo.Visible = false; txtReferenceNo.Visible = false; Random rnd = new Random(); int num = rnd.Next(10000); txtVoucherNumber.Text = "MFB" + num; GetSuppliers(); GetMajorAccounts(); GetMinorAccounts(); } }