Esempio n. 1
0
 public ActionResult GetDatabasePartnersHtml(PartnerDropDownViewModel pdn)
 {
     List<PartnerCustomModel> partnerCustomModels = new List<PartnerCustomModel>();
     try
     {
         partnerCustomModels = PartnerCustomModel.GetSelectListPartners(pdn.SelectedDatabaseName, pdn.SearchPartnerPhrase);
     }
     catch (Exception)
     {
     }
     ActionResult result;
     if (partnerCustomModels.Count == 0)
     {
         result = base.Content("(šai datubāzei nevarēja ielādēt partnerus)");
     }
     else
     {
         PartnerDropDownViewModel partnerDropDownViewModel = new PartnerDropDownViewModel(partnerCustomModels);
         result = this.PartialView("~/Views/Shared/_PartnerDropDown.cshtml", partnerDropDownViewModel);
     }
     return result;
 }
Esempio n. 2
0
 public ActionResult ForTestingPurposes(PartnerDropDownViewModel pdn)
 {
     List<FinancialDocLineCM> financialDocLineCMs = FinancialDocCM.GetTestTemplates(pdn.Database, pdn.PartnerId);
     return this.PartialView("~/Views/DataEntry/_FinancialDocLineCM.cshtml", financialDocLineCMs);
 }
Esempio n. 3
0
 public ActionResult GetNumberOfPartners(PartnerDropDownViewModel pdn)
 {
     int partneruSkaits = 0;
     List<PartnerCustomModel> partnerCustomModels = new List<PartnerCustomModel>();
     try
     {
         partneruSkaits = PartnerCustomModel.GetNumberOfPartners(pdn.SelectedDatabaseName);
     }
     catch (Exception)
     {
     }
     return this.PartialView("~/Views/Shared/_PartnerDropDown.cshtml", new PartnerDropDownViewModel(partnerCustomModels)
     {
         NumberOfPartnersAvailable = partneruSkaits,
         SelectedDatabaseName = pdn.SelectedDatabaseName
     });
 }