Пример #1
0
 public JsonResult tSign()
 {
     try
     {
         ViewtSign entity = new ViewtSign();
         if (!Signclient.ExistsSign(user.Uid))
         {
             entity            = new ViewtSign();
             entity.Uid        = user.Uid;
             entity.CreateDate = DateTime.Now;
             entity.iType      = user.UserType;
             entity.iIntegral  = 0;
             Signclient.Add(entity);
             return(Json(new { code = 0 }));
         }
         else
         {
             return(Json(new { code = 2 }));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { code = 1 }));
     }
 }
Пример #2
0
 public int Update(ViewtSign model)
 {
     try
     {
         return(tSignServiceImpl.Update(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
 public int Add(ViewtSign model)
 {
     Repository.Add(ViewtSign.ToEntity(model));
     return(Repository.Save());
 }
Пример #4
0
 public int Update(ViewtSign model)
 {
     Repository.updateEntity(ViewtSign.ToEntity(model));
     return(Repository.Save());
 }
Пример #5
0
 public ViewtSign GetById(int id)
 {
     return(ViewtSign.ToViewModel(Repository.Get(id)));
 }