public static bool SetUser(user u) { string ret = Cos.find(@"user/(" + u.uid + ")"); if (ret != "") { string[] usern = ret.Replace(@"user/", "").Replace("(", "").Replace(")", "").Split(','); u.regtime = Common.EmptyToStr(u.regtime, usern[1]); u.pwd = Common.EmptyToStr(u.pwd, usern[2]); u.endtime = Common.EmptyToStr(u.endtime, usern[3]); u.utime = Common.EmptyToStr(u.utime, usern[4]); u.sunum = Common.EmptyToStr(u.sunum, usern[5]); u.unum = Common.EmptyToStr(u.unum, usern[6]); u.mcode = Common.EmptyToStr(u.mcode, usern[7]); if (AddUser(u)) { if (Cos.Del(ret) == 204) { return(true); } } } return(false); }
public static bool DelUser(string uid) { return(204 == Cos.Del(Cos.find(@"user/(" + uid + ")"))); }