コード例 #1
0
        public void CheckLogin(object[] objValue)
        {
            GeneralUser objUser = (GeneralUser)objValue[0];
            try
            {

                object[] objParam = { null, objUser.CustomUsers.Password.ToString() };
                DataSet ds = GetDataSet("ValidateUser", objParam);
                // ds.Tables[0].
                int count = ds.Tables[0].Rows.Count;
                if (count > 0)
                {
                    UserRole objuserrole = new UserRole();
                    objuserrole.roles = ds.Tables[0].Rows[0][1].ToString();

                    objUser.CustomUserRole = objuserrole;

                }
            }
            catch (System.Data.SqlClient.SqlException sqlEx)
            {
                if (sqlEx.Number >= 50000)
                {
                    Errors objError = new Errors();
                    objError.ErrorMessage = sqlEx.Message;
                    objUser.CustomError = objError;
                }
            }
        }
コード例 #2
0
 public void UserRole(UserRole userid)
 {
     UserResource obj = new UserResource();
     object[] param ={ userid };
     obj.GetData(param);
 }