Exemplo n.º 1
0
        public UserRoleFunction Get(long UserRolesID, long FunctionID)
        {
            UserRoleFunction objUserRoleFunction = new UserRoleFunction();

            UserRole_DL       objUserRole       = new UserRole_DL(Connection);
            SystemFunction_DL objSystemFunction = new SystemFunction_DL(Connection);


            try
            {
                SqlParameter[] paramList = new SqlParameter[] {
                    new SqlParameter("@Original_UserRoleID", UserRolesID),
                    new SqlParameter("@Original_FuncID", FunctionID)
                };

                DataTable dt = Execute.RunSP_DataTable(Connection, "SPADD_Unit", paramList);


                objUserRoleFunction.SystemFunction = objSystemFunction.Get(Convert.ToInt64(dt.Rows[0]["FuncID"]));
                objUserRoleFunction.UserRole       = objUserRole.Get(Convert.ToInt64(dt.Rows[0]["UserRoleID"]));


                return(objUserRoleFunction);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message, ex);
            }
        }