コード例 #1
0
 public ActionResult Edit(int?id)
 {
     try
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         AccountConfiguration accountconfiguration = configRepo.GetById((int)id);
         if (accountconfiguration == null)
         {
             return(HttpNotFound());
         }
         ViewBag.SavingsInterestExpenseGl_GlAccountId = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Expenses), "ID", "AccountName", accountconfiguration.SavingsInterestExpenseGl != null ? accountconfiguration.SavingsInterestExpenseGl.ID : 0);
         ViewBag.SavingsInterestPayableGl_Id          = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Liability), "ID", "AccountName", accountconfiguration.SavingsInterestPayableGl != null ? accountconfiguration.SavingsInterestPayableGl.ID : 0);
         ViewBag.CurrentIntExpGlId = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Expenses), "ID", "AccountName", accountconfiguration.CurrentInterestExpenseGl != null ? accountconfiguration.CurrentInterestExpenseGl.ID : 0);
         ViewBag.CurrentCotIncGlId = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Income), "ID", "AccountName", accountconfiguration.CurrentCotIncomeGl != null ? accountconfiguration.CurrentCotIncomeGl.ID : 0);
         ViewBag.LoanIntIncomeGlId = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Income), "ID", "AccountName", accountconfiguration.LoanInterestIncomeGl != null ? accountconfiguration.LoanInterestIncomeGl.ID : 0);
         //ViewBag.LoanIntExpGlId = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Expenses), "ID", "AccountName", accountconfiguration.LoanInterestExpenseGl != null ? accountconfiguration.LoanInterestExpenseGl.ID : 0);
         ViewBag.LoanInterestReceivableGl_Id = new SelectList(glaRepo.GetByMainCategory(MainGlCategory.Asset), "ID", "AccountName", accountconfiguration.LoanInterestReceivableGl != null ? accountconfiguration.LoanInterestReceivableGl.ID : 0);
         return(View(accountconfiguration));
     }
     catch (Exception)
     {
         //ErrorLogger.Log("Message= " + ex.Message + "\nInner Exception= " + ex.InnerException + "\n");
         return(PartialView("Error"));
     }
 }
コード例 #2
0
        public IWorkflowConfiguration GetConfiguration(int workflowConfigurationId)
        {
            var workflowConfiguration = ConfigurationRepository.GetById(workflowConfigurationId);

            return(ConfigurationRepository.RestoreState(workflowConfiguration));
        }