Example #1
0
 public User(User o)
 {
     Copy(o);
 }
Example #2
0
 public static bool Exists(User o)
 {
     return Exists(o.contactid);
 }
Example #3
0
 static User LoadFromModel(pmanAPI.App_Data.pmanDB.UserRow row)
 {
     User d = new User();
     LoadUser(row, d);
     return d;
 }
Example #4
0
 static bool Update(User j)
 {
     return UpdateByID(j);
 }
Example #5
0
 public bool Equals(User o)
 {
     if(this.contactid != o.contactid)return false;
      if(this.accesslevel != o.accesslevel)return false;
      if (this.userid != o.userid) return false;
      return true;
 }
Example #6
0
 static bool Delete(User p)
 {
     throw new NotImplementedException();
 }
Example #7
0
        public static bool UpdateByID(User o)
        {
            throw new NotImplementedException();
            /*pmanAPI.App_Data.pmanDBTableAdapters.UserTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.UserTableAdapter();
            int ret  = ta.UpdateByID(
              o.accesslevel,
              o.contactid

               );
               if(ret == 1) return true;
               return false;*/
        }
Example #8
0
 public void Copy(User o)
 {
     this.contactid = o.contactid;
      this.accesslevel = o.accesslevel;
      this.userid = o.userid;
 }
Example #9
0
 public static bool Save(User j)
 {
     if (!User.isValid(j))
         return false;
     if (Exists(j))
     {
         return User.Update(j);
     }
     return User.Insert(j);
 }
Example #10
0
 public static bool Remove(User j)
 {
     if (Exists(j))
     {
         return Delete(j);
     }
     return false;
 }
Example #11
0
        public static void LoadUser(pmanAPI.App_Data.pmanDB.UserRow row, User d)
        {
            try { d.contactid = row.ContactID; }
            catch (Exception) { }

            try { d.accesslevel = row.AccessLevel; }
            catch (Exception) { }

            try { d.userid = row.UserID; }
            catch (Exception) { }
        }
Example #12
0
 public static bool isValid(User o)
 {
     if (o.contactid == String.Empty)
         return false;
     return true;
 }
Example #13
0
        public static bool Insert(User o)
        {
            throw new NotImplementedException();
            /*
            pmanAPI.App_Data.pmanDBTableAdapters.UserTableAdapter ta = new pmanAPI.App_Data.pmanDBTableAdapters.UserTableAdapter();
            ta.InsertQuery(
              o.contactid,
              o.accesslevel

               );
               return true;*/
        }