コード例 #1
0
 public static void ConfigureAppModel(this ModelBuilder builder)
 {
     AppUserProfile.ConfigureFluent(builder);
     AppUserBank.ConfigureFluent(builder);
     AppUserRole.ConfigureFluent(builder);
     AppUserFile.ConfigureFluent(builder);
     Bank.ConfigureFluent(builder);
     Country.ConfigureFluent(builder);
     State.ConfigureFluent(builder);
     LGA.ConfigureFluent(builder);
     Staff.ConfigureFluent(builder);
     Supplier.ConfigureFluent(builder);
     BillPayable.ConfigureFluent(builder);
     BillReceivable.ConfigureFluent(builder);
     Journal.ConfigureFluent(builder);
     JournalLineItem.ConfigureFluent(builder);
     Payment.ConfigureFluent(builder);
     Receipt.ConfigureFluent(builder);
     PayableWorkFlow.ConfigureFluent(builder);
     ReceivableWorkFlow.ConfigureFluent(builder);
     AccountGroup.ConfigureFluent(builder);
     AccountSubType.ConfigureFluent(builder);
     LineItem.ConfigureFluent(builder);
     BankAccount.ConfigureFluent(builder);
     AppData.ConfigureFluent(builder);
 }
コード例 #2
0
        public BillPayable SetWorkFlowStatus(PayableDetailView viewModel)
        {
            var payable = _unitOfWork.BillPayablesRepository
                          .Items.FirstOrDefault(p => p.Id == viewModel.Payable.Id);

            payable.Status = viewModel.Type;

            _unitOfWork.BillPayablesRepository.Update(payable);

            if (viewModel.Type != BillStatusType.DRAFT)
            {
                var workflow = new PayableWorkFlow
                {
                    BillPayable = payable,
                    Comment     = viewModel.Comment,
                    Date        = DateTime.Now
                };

                _unitOfWork.PayableWorkFlowsRepository.Insert(workflow);
            }

            _unitOfWork.SaveChanges();

            return(payable);
        }