public string Insert(Maticsoft.Model.BaseUser model) { if (!Exists(model.UserName)) { if (dal.Insert(model)) { return("success"); } else { return("保存失败!"); } } else { return("用户帐号已经存在!"); } }
public int UpdatePwd(Maticsoft.Model.BaseUser model) { return(Exists(model.UserID.ToString()) ? dal.UpdatePwd(model) : -1); }
/// <summary> /// 更新一条数据 /// </summary> public int Update(Maticsoft.Model.BaseUser model) { return(Exists(model.UserName, model.UserID.ToString()) ? -1 : dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public long Add(Maticsoft.Model.BaseUser model) { return(dal.Add(model)); }