Ejemplo n.º 1
0
 /// <summary>
 /// 编辑数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public override int Update(ES_Dictionary Dictionary)
 {
     using (var Context = new Entities())
     {
         Context.Update <ES_Dictionary>(Dictionary);
         return(Context.SaveExtendChanges());
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 添加数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public override int Insert(ES_Dictionary Dictionary)
 {
     using (var Context = new Entities())
     {
         Dictionary.ID = GuidHelper.NewGuid();
         Context.Insert <ES_Dictionary>(Dictionary);
         return(Context.SaveExtendChanges());
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 编辑数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public ActionResult Edit(ES_Dictionary Dictionary)
 {
     if (Request.HttpMethod.ToUpper() == MethodType.GET)
     {
         return(View(Manager.Get(Dictionary.ID)));
     }
     else
     {
         if (Manager.Update(Dictionary) > 0)
         {
             result.success = true;
         }
         return(Json(result));
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 添加数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public ActionResult Add(ES_Dictionary Dictionary)
 {
     if (Request.HttpMethod.ToUpper() == MethodType.GET)
     {
         return(View());
     }
     else
     {
         if (Manager.Insert(Dictionary) > 0)
         {
             result.success = true;
         }
         return(Json(result));
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 编辑数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public abstract int Update(ES_Dictionary Dictionary);
Ejemplo n.º 6
0
 /// <summary>
 /// 添加数据字典
 /// </summary>
 /// <param name="Dictionary"></param>
 /// <returns></returns>
 public abstract int Insert(ES_Dictionary Dictionary);