Ejemplo n.º 1
0
        /// <summary>
        ///添加角色所擁有的權限ID
        /// </summary>
        public void AddRolePrivilege(Newtonsoft.Json.Linq.JObject requestValue, Newtonsoft.Json.Linq.JObject Data, MESStationReturn StationReturn)
        {
            MESDBHelper.OleExec SFCDB = _DBPools["SFCDB"].Borrow();

            MESDataObject.Module.T_C_ROLE_PRIVILEGE   Roler   = new MESDataObject.Module.T_C_ROLE_PRIVILEGE(SFCDB, DB_TYPE_ENUM.Oracle);
            MESDataObject.Module.Row_C_ROLE_PRIVILEGE RoleRow = (MESDataObject.Module.Row_C_ROLE_PRIVILEGE)Roler.NewRow();

            string Role_Name = Data["ROLE_NAME"].ToString();

            DataTable StrRes = new DataTable();

            this.DBPools["SFCDB"].Return(SFCDB);
        }
Ejemplo n.º 2
0
        public Row_C_ROLE_PRIVILEGE GetC_Role_Privilege_ID(string ROLE_ID, string PRIVILEGE_ID, OleExec DB)
        {
            string sql = string.Empty;

            sql = $@" SELECT * FROM  C_ROLE_PRIVILEGE  WHERE ROLE_ID='{ROLE_ID}' AND PRIVILEGE_ID='{PRIVILEGE_ID}'  ";
            DataSet res = DB.ExecSelect(sql);

            if (res.Tables[0].Rows.Count > 0)
            {
                Row_C_ROLE_PRIVILEGE ret = (Row_C_ROLE_PRIVILEGE)NewRow();
                ret.loadData(res.Tables[0].Rows[0]);
                return(ret);
            }
            else
            {
                return(null);
            }
        }