public ActionResult ClubTypeAdd() { var model = new C_ClubActivityType(); var bll = new C_ClubActivityTypeBll(); if (Request.QueryString["TypeId"] != null) { model = bll.GetModel(int.Parse(Request.QueryString["TypeId"].ToString())); } else { model.IsShow = 1; } return(View(model)); }
public Dictionary <string, object> Add(C_ClubActivityType model) { model.CreateUserId = ManageProvider.Provider.Current().UserId; model.CreateUserName = ManageProvider.Provider.Current().Account; if (model.ClubActivityTypeId > 0) { var model1 = bll.GetModel(model.ClubActivityTypeId); model1.ClubActivityTypeName = model.ClubActivityTypeName; model1.SortCode = model.SortCode; model1.IsShow = model.IsShow; if (bll.Update(model1) > 0) { return(new Dictionary <string, object> { { "code", "1" } }); } else { return(new Dictionary <string, object> { { "code", "0" } }); } } else { if (bll.Add(model) > 0) { return(new Dictionary <string, object> { { "code", "1" } }); } else { return(new Dictionary <string, object> { { "code", "0" } }); } } }
public int Update(C_ClubActivityType model) { return(C_ClubActivityTypeDal.GetInstance().Update(model)); }
public int Add(C_ClubActivityType model) { return(C_ClubActivityTypeDal.GetInstance().Add(model)); }