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 })); } }
public int Update(ViewtSign model) { try { return(tSignServiceImpl.Update(model)); } catch (Exception ex) { throw ex; } }
public int Add(ViewtSign model) { Repository.Add(ViewtSign.ToEntity(model)); return(Repository.Save()); }
public int Update(ViewtSign model) { Repository.updateEntity(ViewtSign.ToEntity(model)); return(Repository.Save()); }
public ViewtSign GetById(int id) { return(ViewtSign.ToViewModel(Repository.Get(id))); }