Пример #1
0
        public ClsUserDetails GetUserDetailsByUserID(int argUserID)
        {
            UserMaster     Table   = new UserMaster();
            DataSet        ds      = Table.GetUserDetailsByUserID(argUserID);
            ClsUserDetails details = new ClsUserDetails();

            if (HasData(ds, 0))
            {
                if (ds.Tables[0].Rows[0] != null)
                {
                    details.UserID        = ds.Tables[0].Rows[0]["nID"].ToString();
                    details.UserName      = ds.Tables[0].Rows[0]["cFullName"].ToString();
                    details.ShortID       = ds.Tables[0].Rows[0]["cShortID"].ToString();
                    details.Email         = ds.Tables[0].Rows[0]["cMailId"].ToString();
                    details.ContactNo     = ds.Tables[0].Rows[0]["cContactNumber"].ToString();
                    details.Password      = Decrypt(ds.Tables[0].Rows[0]["cPassword"].ToString());
                    details.LeveID        = Convert.ToInt32(ds.Tables[0].Rows[0]["nLevelID"].ToString());
                    details.DesignationID = Convert.ToInt32(ds.Tables[0].Rows[0]["nDesignationID"].ToString());
                    details.DepartmentID  = Convert.ToInt32(ds.Tables[0].Rows[0]["nDepartmentID"].ToString());
                }
            }

            return(details);
        }