public String UserResetPassword(TUserInsertModel mdl) { try { string ret = ""; var res = db.PTUserUpdateResetPassword(mdl.IDUser, mdl.UserLastMaintenance, mdl.DateLastMaintenance, mdl.LastPasswordChange).FirstOrDefault(); if (res.Error == 0 || res.Error == null) { ret = res.Pesan + '|' + res.NamaUser + '|' + res.Password + '|' + res.Email; ret = "1"; } else { ret = "Err|" + res.Pesan; ret = "0"; } return(ret); } catch (SqlException e) { return("Err|" + e.InnerException.Message); } }
public String UserUnlocked(TUserInsertModel mdl) { try { string ret = ""; var res = db.PTUserUpdateLocked(mdl.IDUser, mdl.Locked, mdl.UserLastMaintenance, mdl.DateLastMaintenance).FirstOrDefault(); if (res.Error == 0 || res.Error == null) { var retSplit = res.Pesan.Split('|'); ret = TranslateMessageClass.TranslateMessage(retSplit[0], Resources.Resource.LabelUserName, retSplit[1]); ret = "1"; } else { ret = "Err|" + res.Pesan; ret = "0"; } return(ret); } catch (SqlException e) { return("Err|" + e.InnerException.Message); } }