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; }
public ActionResult ForTestingPurposes(PartnerDropDownViewModel pdn) { List<FinancialDocLineCM> financialDocLineCMs = FinancialDocCM.GetTestTemplates(pdn.Database, pdn.PartnerId); return this.PartialView("~/Views/DataEntry/_FinancialDocLineCM.cshtml", financialDocLineCMs); }
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 }); }