コード例 #1
0
        public MemberOutput MemberbyUsername(string username)
        {
            if (username == null || username.Trim() == "")
            {
                return(null);
            }
            C02_BIMstaff item = db.C02_BIMstaff.FirstOrDefault(s => s.Username == username);

            if (item == null)
            {
                return(null);
            }
            MemberOutput member = new MemberOutput()
            {
                ID         = item.BIMstaffID,
                SoftName   = item.Sortname,
                UserName   = item.Username,
                Password   = item.Password,
                Department = item.Deparment,
                UserType   = item.UserType,
                UserStatus = item.UserStatus
            };

            return(member);
        }
コード例 #2
0
        public MemberOutput MemberbyID(int id)
        {
            if (id == null || id < 0)
            {
                return(null);
            }
            C02_BIMstaff item = db.C02_BIMstaff.Find(id);

            if (item == null)
            {
                return(null);
            }
            MemberOutput member = new MemberOutput()
            {
                ID         = item.BIMstaffID,
                SoftName   = item.Sortname,
                UserName   = item.Username,
                Password   = item.Password,
                Department = item.Deparment,
                UserType   = item.UserType,
                UserStatus = item.UserStatus
            };

            return(member);
        }