public string AddFT(int Acc1, int Acc2, double Amount, string State, DateTime Date, string Notes) { new AccountingTree().AddFT(new FinancialTransaction { FromAccount = Acc1, Debit = Amount, Credit = 0, Statement = State, TransactionDate = Date, Notes = Notes, LastEditBy = (Session["User"] as User).ID }).Data.ToString(); string Ret = new AccountingTree().AddFT(new FinancialTransaction { FromAccount = Acc2, Credit = Amount, Debit = 0, Statement = State, TransactionDate = Date, Notes = Notes, LastEditBy = (Session["User"] as User).ID }).Data.ToString(); return(Ret); }
// // GET: /Home/ public ActionResult Index() { ViewBag.CustomerNo = Convert.ToInt32(new Customer().GetCustomerNumbers().Data); ViewBag.TotalSales = Convert.ToDouble(new Project().TotalSales(0).Data); ViewBag.TotalCosts = Convert.ToDouble(new Project().TotalCosts(0).Data); ViewBag.PendingInstallments = Convert.ToDouble(new Project().PendingInstallment(0).Data); ViewBag.AllProj = new Project().GetAll().Data as List <Project>; ViewBag.SupplierDue = Convert.ToDouble(new Supplier().GetSupplierDue().Data); Session["PI"] = new AccountingTree().GetPaidInstallmentsFtToSave().Data; Session["AI"] = new AccountingTree().GetAllInstallmentsFtToSave().Data; Session["TS"] = new AccountingTree().GetTotalSalesFtToSave().Data; return(View()); }