public ActionResult Index(string category) { var sql = Odp.Data.Sql.sqlServerConnection.GetDataServiceInstance(); model = new CategoryModel(); model.OtherModel = new DatasetListModel(0, 0, new OrderByInfo(), null, null); model.Id = sql.GetCategoryID(category); model.Name = category; return View("Index", System.Configuration.ConfigurationManager.AppSettings["MasterPageName"], model); }
public ActionResult Index(CategoryModel model) { var sql = Odp.Data.Sql.sqlServerConnection.GetDataServiceInstance(); this.model = model; if (model.Save == "Save") { if (model.Id == null) sql.InsertCategory(model.Name); else sql.UpdateCategory(model.Id, model.Name); } else { return RedirectToAction("DataSetList", "DataCatalog"); } return RedirectToAction("DataSetList", "DataCatalog"); }