Beispiel #1
0
 /// <summary>
 /// 设置是否展示在前站
 /// </summary>
 /// <param name="id"></param>
 /// <param name="look"></param>
 /// <returns></returns>
 public ActionResult UpdateLook(int id, int look)
 {
     if (id > 0)
     {
         model.Commerce model = new crm16.model.Commerce()
         {
             id   = id,
             Look = look
         };
         try
         {
             Commerce.Edit(model, new string[] { "Look" });
             Commerce.SaveChanges();
             return(WriteSuccess("设置成功"));
         }
         catch (Exception ex)
         {
             return(WriteError("设置失败:" + ex.Message));
         }
     }
     return(WriteError("设置失败:选择值参数为空,请在尝试"));
 }
Beispiel #2
0
 public ActionResult Delete(int id)
 {
     if (id > 0)
     {
         model.Commerce model = new crm16.model.Commerce()
         {
             id       = id,
             IsDelete = 1,
         };
         try
         {
             Commerce.Edit(model, new string[] { "IsDelete" });
             Commerce.SaveChanges();
             return(WriteSuccess("删除成功"));
         }
         catch (Exception ex)
         {
             return(WriteError("删除失败:" + ex.Message));
         }
     }
     return(WriteError("删除失败:选择值参数为空,请在尝试"));
 }