private void controlCashIn_Load(object sender, EventArgs e) { accountBAL = new AccountBAL(); lstAccount = accountBAL.GetAllAccounts(); tblAccount = accountBAL.GetAllAccountsEx(); BindData(); }
public frmEditBill(string AccountNo) { accountBAL = new AccountBAL(); accountNo = AccountNo; InitializeComponent(); Init(); }
public ActionResult Edit(int id) { AccountVM viewModel = new AccountVM(); AccountBAL balObject = new AccountBAL(); IQueryable <Entities.Account> entites = balObject.FindBy(a => a.SrNo == id); if (entites != null && entites.Count() > 0) { Entities.Account entity = entites.FirstOrDefault(); viewModel.SrNo = entity.SrNo; viewModel.NarrationDetails = entity.NarrationDetails; viewModel.TransactionType = entity.TransactionType; viewModel.PaymentMode = entity.PaymentMode; viewModel.Amount = entity.Amount; viewModel.Balance = entity.Balance; viewModel.TransactionDate = entity.TransactionDate; viewModel.Remark = entity.Remark; viewModel.CustomerName = entity.CustomerName; viewModel.BankName = entity.BankName; viewModel.ChqDDNumber = entity.ChqDDNumber; viewModel.ContactNo = entity.ContactNo; } return(View(viewModel)); }
// // GET: /SysAdmin/Asset/ public ActionResult Index() { List <AccountVM> viewModels = new List <AccountVM>(); AccountBAL balObject = new AccountBAL(); IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId); foreach (Entities.Account entity in entites) { AccountVM viewModel = new AccountVM(); viewModel.SrNo = entity.SrNo; viewModel.NarrationDetails = entity.NarrationDetails; viewModel.TransactionType = entity.TransactionType; viewModel.PaymentMode = entity.PaymentMode; viewModel.Amount = entity.Amount; viewModel.Balance = entity.Balance; viewModel.TransactionDate = entity.TransactionDate; viewModel.Remark = entity.Remark; viewModel.CustomerName = entity.CustomerName; viewModel.BankName = entity.BankName; viewModel.ChqDDNumber = entity.ChqDDNumber; viewModel.ContactNo = entity.ContactNo; viewModels.Add(viewModel); } return(View(new GridModel <AccountVM> { Data = viewModels })); }
public ProceedOrderBAL() { this.cartBal = new CartBAL(); this.accountBal = new AccountBAL(); this.orderBal = new OrderBAL(); this.bookBal = new BookBAL(); }
public DashboardBAL() { bookBal = new BookBAL(); this.categoryBal = new CategoryBAL(); this.accountBal = new AccountBAL(); publisherBal = new PublisherBAL(); this.UserBal = new UserBAL(); }
public AdminBAL() { accountBal = new AccountBAL(); orderBal = new OrderBAL(); bookBal = new BookBAL(); authorBal = new AuthorBAL(); crudBookBal = new CRUDBookBAL(); categoryBal = new CategoryBAL(); formBookBal = new FormBookBAL(); supplierBal = new SupplierBAL(); publisherBal = new PublisherBAL(); }
public ActionResult Delete(int id) { try { // TODO: Add delete logic here AccountBAL balObject = new AccountBAL(); balObject.Delete(id); return(RedirectToAction("Index")); } catch { return(View()); } }
private DataSet CashBookReport(DateTime fromDate, DateTime toDate) { DataSet ds = new DataSet(); ds.DataSetName = "DataSourceForReport"; DataTable dt = new DataTable("AccountDetails"); dt.TableName = "AccountDetails"; dt.Columns.Add(new DataColumn("SrNo", typeof(int))); dt.Columns.Add(new DataColumn("NarrationDetails", typeof(string))); dt.Columns.Add(new DataColumn("TransactionType", typeof(string))); dt.Columns.Add(new DataColumn("Amount", typeof(decimal))); dt.Columns.Add(new DataColumn("Total", typeof(decimal))); dt.Columns.Add(new DataColumn("Remark", typeof(string))); dt.Columns.Add(new DataColumn("TransactionDate", typeof(DateTime))); AccountBAL balObject = new AccountBAL(); IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId); if (entites != null && entites.Count() > 0) { foreach (Entities.Account entity in entites) { DataRow dr = dt.NewRow(); dr["SrNo"] = entity.SrNo; dr["NarrationDetails"] = entity.NarrationDetails; dr["TransactionType"] = entity.TransactionType; dr["Amount"] = entity.Amount; dr["Total"] = 0;//entity.Total; dr["Remark"] = entity.Remark; dr["TransactionDate"] = entity.TransactionDate; reportName = "_"; dt.Rows.Add(dr); } } ds.Tables.Add(getSchoolDetails()); ds.Tables.Add(dt); return(ds); }
public ActionResult Create(AccountVM viewModel) { try { // TODO: Add insert logic here if (ModelState.IsValid) { Entities.Account entity = new Entities.Account(); entity.SrNo = viewModel.SrNo; entity.NarrationDetails = viewModel.NarrationDetails; entity.TransactionType = viewModel.TransactionType; entity.PaymentMode = viewModel.PaymentMode; entity.Amount = viewModel.Amount; entity.Balance = viewModel.Balance; entity.TransactionDate = DateTime.Now; entity.Remark = viewModel.Remark == null ? string.Empty : viewModel.Remark; entity.CustomerName = viewModel.CustomerName; entity.BankName = viewModel.BankName; entity.ChqDDNumber = viewModel.ChqDDNumber; entity.ContactNo = viewModel.ContactNo; AccountBAL balObject = new AccountBAL(); balObject.Add(entity, SessionHelper.SchoolId); TempData["Message"] = "Account entry added successfully !!!"; } else { TempData["Error"] = "Some problem while adding account entry !!!"; } } catch { TempData["Error"] = "Some problem while adding account entry !!!"; } return(View(viewModel)); }
public ActionResult Select() { string mode = Request.QueryString["Grid-mode"]; if (!string.IsNullOrEmpty(mode)) { return(this.RedirectToAction("Create")); } else { List <AccountVM> viewModels = new List <AccountVM>(); AccountBAL balObject = new AccountBAL(); IQueryable <Entities.Account> entites = balObject.GetAll(SessionHelper.SchoolId); foreach (Entities.Account entity in entites) { AccountVM viewModel = new AccountVM(); viewModel.SrNo = entity.SrNo; viewModel.NarrationDetails = entity.NarrationDetails; viewModel.TransactionType = entity.TransactionType; viewModel.PaymentMode = entity.PaymentMode; viewModel.Amount = entity.Amount; viewModel.Balance = entity.Balance; viewModel.TransactionDate = entity.TransactionDate; viewModel.Remark = entity.Remark; viewModel.CustomerName = entity.CustomerName; viewModel.BankName = entity.BankName; viewModel.ChqDDNumber = entity.ChqDDNumber; viewModel.ContactNo = entity.ContactNo; viewModels.Add(viewModel); } return(View(new GridModel <AccountVM> { Data = viewModels })); } }
public ActionResult Edit(AccountVM viewModel) { try { // TODO: Add update logic here if (ModelState.IsValid) { Entities.Account entity = new Entities.Account(); entity.SrNo = viewModel.SrNo; entity.NarrationDetails = viewModel.NarrationDetails; entity.TransactionType = viewModel.TransactionType; entity.PaymentMode = viewModel.PaymentMode; entity.Amount = viewModel.Amount; entity.Balance = viewModel.Balance; entity.TransactionDate = viewModel.TransactionDate; entity.Remark = viewModel.Remark; entity.CustomerName = viewModel.CustomerName; entity.BankName = viewModel.BankName; entity.ChqDDNumber = viewModel.ChqDDNumber; entity.ContactNo = viewModel.ContactNo; AccountBAL balObject = new AccountBAL(); balObject.Edit(entity); TempData["Message"] = "Account updated successfully !!!"; } else { TempData["Error"] = "Some problem while updating account entry !!!"; } } catch { TempData["Error"] = "Some problem while updating account entry !!!"; } return(View(viewModel)); }
public PAccount() { accountBal = new AccountBAL(); }
public UserProfileBAL() { userBal = new UserBAL(); accountBal = new AccountBAL(); }
public LoginBAL() { this.accountBal = new AccountBAL(); this.userBal = new UserBAL(); this.cartBal = new CartBAL(); }
public AccountController() { this._account = new AccountBAL(); }
public UserOrderBAL() { accountBal = new AccountBAL(); orderBal = new OrderBAL(); }
public UserCartBAL() { this.cartBal = new CartBAL(); this.accountBal = new AccountBAL(); this.categoryBal = new CategoryBAL(); }