public bool UpdateRole(string ticket, string _ynRole, ref string message) { try { message = ""; if (!IsTicketValid(ticket)) { throw new Exception("票证验证失败!"); } YnRole ynRole = (YnRole)YnBaseClass2.Helper.ObjectHelper.Deserialize(typeof(YnRole), _ynRole); //ynUser.lastLoginDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); YnRoleService.GetInstance().Update(ynRole); return(true); } catch (Exception ex) { message = ex.Message; } return(false); }
public string SaveRole(string ticket, string _ynRole, ref string message) { try { message = ""; if (!IsTicketValid(ticket)) { throw new Exception("票证验证失败!"); } YnRole ynRole = (YnRole)YnBaseClass2.Helper.ObjectHelper.Deserialize(typeof(YnRole), _ynRole); YnRoleService.GetInstance().Save(ynRole); return(YnBaseClass2.Helper.ObjectHelper.Serialize(ynRole)); } catch (Exception ex) { message = ex.Message; } return(null); }