public void RepairFormsModel(FormsModel fm, int?page) { if (fm == null) { fm = new FormsModel(); } if (page == null) { page = 1; } if (fm.CurentPage == null) { fm.CurentPage = page; } //Get List Site string SelectedSite = fm.SelectedSite; fm.SiteSelector = EsignCommon.GetSelectListSite(ref SelectedSite, true); fm.SelectedSite = SelectedSite; //Get List BU string SelectedBU = fm.SelectedBU; fm.BUSelector = EsignCommon.GetSelectListBU(fm.SelectedSite, ref SelectedBU, true); fm.SelectedBU = SelectedBU; }
public static SelectList GetSelectListType(ref string selectedType) { List <string> ListType = EsignCommon.GetListType(); if (string.IsNullOrWhiteSpace(selectedType)) { selectedType = ListType.Count > 0 ? ListType[0] : null; } return(new SelectList(ListType, selectedType)); }
// function public void RepairSelectListModel(ApproverDetailModel adm) { //Get List Type string SelectedType = adm.SelectedType; adm.TypeSelector = EsignCommon.GetSelectListType(ref SelectedType); adm.SelectedType = SelectedType; //Get List Site string SelectedSite = adm.SelectedSite; adm.SiteSelector = EsignCommon.GetSelectListSite(ref SelectedSite); adm.SelectedSite = SelectedSite; //Get List BU string SelectedBU = adm.SelectedBU; adm.BUSelector = EsignCommon.GetSelectListBU(adm.SelectedSite, ref SelectedBU); }