public ActionResult Create(BaseModel baseModel) { USAStateModel uSAStateModel = new USAStateModel(); uSAStateModel.CopyBaseModel(baseModel); using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { uSAStateBAL.PrepareUSAStateModel(uSAStateModel); } return(View("Create", uSAStateModel)); }
public JsonResult GetUSAStates(DataTableSearchParameters <Nullable <bool> > dataTableSearchParameters) { GenericListModel <USAStateModel> baseListModel = new GenericListModel <USAStateModel>(); using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { baseListModel = uSAStateBAL.GetSearchUSAStatesList(dataTableSearchParameters); } return(Json(new { baseModel = baseListModel }, JsonRequestBehavior.AllowGet)); }
public ActionResult View(string id) { USAStateModel uSAStateModel = new USAStateModel(); uSAStateModel.Id = id; using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { uSAStateBAL.GetUSAStateModel(uSAStateModel); // uSAStateBAL.PrepareUSAStateModel(uSAStateModel); } return(View(uSAStateModel)); }
// GET: USAState/Edit/5 public ActionResult Edit(string id, BaseModel baseModel) { USAStateModel uSAStateModel = new USAStateModel(); uSAStateModel.CopyBaseModel(baseModel); uSAStateModel.Id = id; using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { uSAStateBAL.GetUSAStateModel(uSAStateModel); uSAStateBAL.PrepareUSAStateModel(uSAStateModel); } return(View(uSAStateModel)); }
public ActionResult Delete(USAStateModel uSAStateModel) { using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { uSAStateBAL.Delete(uSAStateModel); if (uSAStateModel.HasErrorByType()) { uSAStateBAL.GetUSAStateModel(uSAStateModel); // uSAStateBAL.PrepareUSAStateModel(uSAStateModel); } } return(View(uSAStateModel)); }
public ActionResult Create(USAStateModel uSAStateModel) { using (USAStateBAL uSAStateBAL = new USAStateBAL(ContextInfo)) { if (ModelState.IsValid) { uSAStateBAL.Create(uSAStateModel); } if (uSAStateModel.HasErrorByType(LMYFrameWorkMVC.Common.LookUps.ErrorType.Critical) || uSAStateModel.HasSuccess(LMYFrameWorkMVC.Common.LookUps.SuccessType.Full)) { return(base.RedirectToActionWithData(new Dictionary <string, object> { { "baseModel", uSAStateModel } })); } uSAStateBAL.PrepareUSAStateModel(uSAStateModel); } return(View("Create", uSAStateModel)); }