public ActionResult PrintSummary(AccountingModel model) { var list = PatientServices.GetPatientsSummary(model.date, model.BranchId); var branch = BranchServices.GetById(model.BranchId); GenerateSummaryReport(list, model.date, branch.BranchName); return(Json("Cash Summary Generated", JsonRequestBehavior.AllowGet)); }
public async Task <ActionResult <AccountingModel> > AccountingAsync(int accountingNumber, DateTimeOffset?statusDate = null) { IGetAccountingQuery query = new GetAccountingQuery { AccountingNumber = accountingNumber, StatusDate = statusDate?.LocalDateTime.Date ?? DateTime.Today }; IAccounting accounting = await _queryBus.QueryAsync <IGetAccountingQuery, IAccounting>(query); AccountingModel accountingModel = _accountingModelConverter.Convert <IAccounting, AccountingModel>(accounting); return(new OkObjectResult(accountingModel)); }
public void AddAccounting(AccountingModel data) { var temp = new AccountBook { Id = Guid.NewGuid(), Categoryyy = data.Category == "0" ? 0 : 1, Amounttt = data.Amount, Dateee = data.Date, Remarkkk = data.Remark }; Create(temp); Commit(); }
public async Task AccountingAsync_WhenCalled_AssertOkObjectResultContainsAccounting() { IAccounting accountingMock = _fixture.BuildAccountingMock().Object; Controller sut = CreateSut(accountingMock); OkObjectResult result = (OkObjectResult)(await sut.AccountingAsync(_fixture.Create <int>())).Result; Assert.That(result.Value, Is.Not.Null); AccountingModel accountingModel = (AccountingModel)result.Value; Assert.That(accountingModel, Is.Not.Null); Assert.That(accountingModel.Number, Is.EqualTo(accountingMock.Number)); Assert.That(accountingModel.Name, Is.EqualTo(accountingMock.Name)); }
public ActionResult PrintDoctorSummary(AccountingModel model) { if (model.BranchId > 0) { var list = PatientServices.GetDoctorWiseSummary(model.FromDate, model.ToDate, model.BranchId); var branch = BranchServices.GetById(model.BranchId); GenerateDoctorWiseReport(list, model.FromDate, model.ToDate, branch.BranchName); } else { return(Json("BranchId could not be Zero", JsonRequestBehavior.AllowGet)); } return(Json("sucess", JsonRequestBehavior.AllowGet)); }
public ActionResult Accounting() { var model = new AccountingModel(); var branches = BranchServices.GetAllBranches(); foreach (var item in branches) { model.Branches.Add(new SelectListItem { Text = item.BranchName, Value = item.Id.ToString() }); } return(View(model)); }
//实例化 public AccountingService() { accountingModel = new AccountingModel(); try { //获取token string token = FinanceToken.getFinanceCheckToken().getToken(); //获取对象 account = FinanceToken.getFinanceCheckToken().checkToken(token); //实例化model层 accountingModel = new AccountingModel(); } catch { throw new InvalidOperationException("身份验证不通过"); } }
public IActionResult Accounting() { var model = new AccountingModel(); model.CreditTypeItems = this.accountingTypes.All().Where(t => t.MovementType == "Credit").To <AccountingTypeModel>().ToList(); model.DebitTypeItems = this.accountingTypes.All().Where(t => t.MovementType == "Debit").To <AccountingTypeModel>().ToList(); model.CompanyItems = this.companies.All() .Select(c => new SelectListItem { Text = c.Name, Value = c.Id }) .ToList(); model.BankItems = Enum.GetValues(typeof(BankCodes)).Cast <BankCodes>().Select( enu => new SelectListItem() { Text = enu.ToString(), Value = enu.ToString() }).ToList(); return(this.View(model)); }
public XamlItemGroup FindParent(XamlItemGroup group, AccountingModel account) { if (group.GroupId == account.ParentId) { return(group); } if (group.Children != null) { foreach (var currentGroup in group.Children) { var search = FindParent(currentGroup, account); if (search != null) { return(search); } } } return(null); }
public ActionResult AjaxPost(AccountingModel data) { aServ.AddAccounting(data); return(PartialView("AjaxAction")); }
public ActionResult Accounting(AccountingModel data) { aServ.AddAccounting(data); return(RedirectToAction("Accounting", "Home")); }