Ejemplo n.º 1
0
 public static TUserInfo GetGroupMemberByGroupMemberId(int groupmemberid)
 {
     try
     {
         TUserInfo group = TUserInfo.FindOne(CK.K["GroupMemberId"] == groupmemberid && CK.K["IsDel"] == "False");
         return(group);
     }
     catch
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
 public static TUserInfo GetPersonMemberByPersonMemberId(int personmemberid)
 {
     try
     {
         TUserInfo person = TUserInfo.FindOne(CK.K["PersonMemberId"] == personmemberid && CK.K["IsDel"] == "False");
         return(person);
     }
     catch
     {
         return(null);
     }
 }
Ejemplo n.º 3
0
 public static string DeleteUserByGroupMemberId(int infoid, int deluserid, DateTime deltime)
 {
     try
     {
         var delinfo = TUserInfo.FindOne(CK.K["GroupMemberId"] == infoid && CK.K["IsDel"] == false && CK.K["UserTypeId"] == 5);
         delinfo.IsDel     = true;
         delinfo.DelUserId = deluserid;
         delinfo.DelTime   = deltime;
         delinfo.Save();
         return("1");
     }
     catch
     {
         return("0");
     }
 }
Ejemplo n.º 4
0
        public static string UpdatePersonMemberAccount(int personmemberid, string account, int createuserid, DateTime createtime)
        {
            try
            {
                TUserInfo person = TUserInfo.FindOne(CK.K["PersonMemberId"] == personmemberid && CK.K["IsDel"] == "False");
                person.Account = account;


                person.IsDel        = false;
                person.CreateUserId = createuserid;
                person.CreateTime   = createtime;
                person.Save();
                return("1");
            }
            catch
            {
                return("0");
            }
        }
Ejemplo n.º 5
0
 public static bool IsExist(string account, int exceptUserId)
 {
     try
     {
         Condition con = CK.K["Account"] == account && CK.K["IsDel"] == false;
         if (exceptUserId != 0)
         {
             con &= CK.K["Id"] != exceptUserId;
         }
         var user = TUserInfo.FindOne(con);
         if (user == null)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     catch
     {
         return(true);
     }
 }