public ActionResult AddSimCode() { AddSimCodeModels model = new AddSimCodeModels(); model.OpeningDate = DateTime.Today.ToString("yyyy-MM-dd"); model.PurchaseDate = DateTime.Today.ToString("yyyy-MM-dd"); model.ExpiryDate = DateTime.Today.ToString("yyyy-MM-dd"); model.CommModeSelectList = new SelectList(SimCodeBLL.GetCommMode(), "ID", "Name"); model.ServiceProviderSelectList = new SelectList(SimCodeBLL.GetServiceProvider(), "ID", "Name"); //var structures = StructureBLL.GetStructures(); //model.OwnerStrucName = new SelectList(structures, "ID", "StrucName"); //model.UseStrucName = new SelectList(structures, "ID", "StrucName"); return(PartialView("_AddSimCode", model)); }
public ActionResult SearchSimCode() { SearchDataWithPagedDatas <SimCodeSearchModels, SimCodeListModels> model = new SearchDataWithPagedDatas <SimCodeSearchModels, SimCodeListModels>(); model.SearchModel = new SimCodeSearchModels(); model.SearchModel.CommModeSelectList = SimCodeBLL.GetCommMode().ToSelectListWithAll(m => GetSelectListItem(m.ID, m.Name)); model.SearchModel.CommMode = -1; model.SearchModel.ServiceProviderSelectList = SimCodeBLL.GetServiceProvider().ToSelectListWithAll(m => GetSelectListItem(m.ID, m.Name)); model.SearchModel.ServiceProviderID = -1; model.SearchModel.UseStrucID = -1; model.SearchModel.OwnerStrucID = -1; model.PagedDatas = SimCodeBLL.GetPagedSimCode(model.SearchModel, 1, this.PageSize); return(PartialView("_SearchSimCodeList", model)); }
public ActionResult EditSimCode(int id) { var result = SimCodeBLL.GetSimCodeID(id); if (result.DataResult == null) { return(Content(result.Message)); } var model = result.DataResult; model.CommModeSelectList = new SelectList(SimCodeBLL.GetCommMode(), "ID", "Name"); model.ServiceProviderSelectList = new SelectList(SimCodeBLL.GetServiceProvider(), "ID", "Name"); //var structures = StructureBLL.GetStructures(); //model.OwnerStrucName = new SelectList(structures, "ID", "StrucName",model.OwnerStrucID); //model.UseStrucName = new SelectList(structures, "ID", "StrucName",model.UseStrucID); return(PartialView("_EditSimCode", model)); }