Example #1
0
        /// <summary>
        /// 根据AID修改主体权限
        /// </summary>
        /// <param name="MainAuthority">主体权限对象</param>
        /// <param name="dt">最后修改时间</param>
        public void PutMainAuthorityByAID(MainAuthority mainAuthority, DateTime dt)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"update 主体权限
                            set 主体ID = :主体ID,                                
                                主体名称=:主体名称,
                                类型= :类型,
                                角色ID=:角色ID,
                                权限类型=:权限类型,
                                最后修改人=:最后修改人,
                                最后修改时间=:最后修改时间
                            where 主体权限ID=:主体权限ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":主体ID",   OracleDbType.Varchar2, mainAuthority.MID == null?"":mainAuthority.MID,                     ParameterDirection.Input),
                new OracleParameter(":主体名称",   OracleDbType.Varchar2, mainAuthority.MainName == null?"":mainAuthority.MainName,           ParameterDirection.Input),
                new OracleParameter(":类型",     OracleDbType.Varchar2, mainAuthority.Type,                                                 ParameterDirection.Input),
                new OracleParameter(":角色ID",   OracleDbType.Varchar2, mainAuthority.RoleID,                                               ParameterDirection.Input),
                new OracleParameter(":权限类型",   OracleDbType.Varchar2, mainAuthority.AuthorityType == null?"":mainAuthority.AuthorityType, ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, mainAuthority.LastModify == null?"":mainAuthority.LastModify,       ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                                 ParameterDirection.Input),
                new OracleParameter(":主体权限ID", OracleDbType.Varchar2, mainAuthority.AID,                                                  ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #2
0
        /// <summary>
        /// 根据ID修改资源目录
        /// </summary>
        /// <param name="resource">资源目录对象</param>
        /// <param name="dt">最后修改时间</param>
        public void PutResourceByID(Resource resource, DateTime dt)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"update 资源目录  set  上级资源ID=:上级资源ID,
                                                 资源名称=:资源名称,
                                                 类型=:类型,
                                                 备注=:备注,
                                                 最后修改人=:最后修改人,
                                                 最后修改时间=:最后修改时间,
                                                 显示名称=:显示名称,
                                                 是否树形=:是否树形,
                                                 关系资源ID=:关系资源ID 
                                             where 资源ID=:资源ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":上级资源ID", OracleDbType.Varchar2, resource.PID == null?"":resource.PID,               ParameterDirection.Input),
                new OracleParameter(":资源名称",   OracleDbType.Varchar2, resource.Name,                                      ParameterDirection.Input),
                new OracleParameter(":类型",     OracleDbType.Varchar2, resource.Type,                                      ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, resource.Note == null?"":resource.Note,             ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, resource.LastModify == null?"":resource.LastModify, ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                 ParameterDirection.Input),
                new OracleParameter(":显示名称",   OracleDbType.Varchar2, resource.ShowName,                                  ParameterDirection.Input),
                new OracleParameter(":是否树形",   OracleDbType.Long,     resource.TreeForm,                                  ParameterDirection.Input),
                new OracleParameter(":关系资源ID", OracleDbType.Varchar2, resource.RelationID == null?"":resource.RelationID, ParameterDirection.Input),
                new OracleParameter(":资源ID",   OracleDbType.Varchar2, resource.ID,                                        ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #3
0
        /// <summary>
        /// 角色权限管理页面其他权限管理新增主体权限
        /// </summary>
        /// <param name="mainAuthority"></param>
        /// <param name="dt">最后修改时间</param>
        public string CreateMainAuthorityByOthers(MainAuthority mainAuthority, DateTime dt)
        {
            string           sql = @"insert into 主体权限( 主体权限ID,
                                                 类型,
                                                 主体ID,
                                                 角色ID,
                                                 权限类型,
                                                 最后修改人,
                                                 最后修改时间,
                                                 主体名称) 
                                        values(:主体权限ID,:类型,:主体ID,:角色ID,:权限类型,:最后修改人,:最后修改时间,:主体名称)";
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":主体权限ID", OracleDbType.Varchar2, mainAuthority.AID,           ParameterDirection.Input),
                new OracleParameter(":类型",     OracleDbType.Varchar2, mainAuthority.Type,          ParameterDirection.Input),
                new OracleParameter(":主体ID",   OracleDbType.Varchar2, mainAuthority.MID,           ParameterDirection.Input),
                new OracleParameter(":角色ID",   OracleDbType.Varchar2, mainAuthority.RoleID,        ParameterDirection.Input),
                new OracleParameter(":权限类型",   OracleDbType.Varchar2, mainAuthority.AuthorityType, ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, mainAuthority.LastModify,    ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                          ParameterDirection.Input),
                new OracleParameter(":主体名称",   OracleDbType.Varchar2, mainAuthority.MainName,      ParameterDirection.Input)
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
            return("OK");
        }
Example #4
0
        /// <summary>
        /// 根据ID修改统计指标
        /// </summary>
        /// <param name="CountNorm">统计指标对象</param>
        /// <param name="dt">最后修改时间</param>
        public void PutCountNormByID(CountNorm countNorm, DateTime dt)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"update 统计指标定义  
                                set 指标名称 = :指标名称, 
                                    计算类型 = :计算类型, 
                                    运算符 = :运算符, 
                                    运算值 = :运算值, 
                                    关联类型 = :关联类型, 
                                    关联ID = :关联ID, 
                                    备注 = :备注, 
                                    最后修改人 = :最后修改人,
                                    最后修改时间 = :最后修改时间, 
                                    资源ID = :资源ID 
                                where 指标定义ID=:指标定义ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":指标名称",   OracleDbType.Varchar2, countNorm.NormName == null?"":countNorm.NormName,               ParameterDirection.Input),
                new OracleParameter(":计算类型",   OracleDbType.Varchar2, countNorm.CalculateType == null?"":countNorm.CalculateType,     ParameterDirection.Input),
                new OracleParameter(":运算符",    OracleDbType.Varchar2, countNorm.Operator == null?"":countNorm.Operator,               ParameterDirection.Input),
                new OracleParameter(":运算值",    OracleDbType.Varchar2, countNorm.Ovalue == null?"":countNorm.Ovalue,                   ParameterDirection.Input),
                new OracleParameter(":关联类型",   OracleDbType.Varchar2, countNorm.AssociationType == null?"":countNorm.AssociationType, ParameterDirection.Input),
                new OracleParameter(":关联ID",   OracleDbType.Varchar2, countNorm.GLID == null?"":countNorm.GLID,                       ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, countNorm.Note == null?"":countNorm.Note,                       ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, countNorm.LastModify == null?"":countNorm.LastModify,           ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                             ParameterDirection.Input),
                new OracleParameter(":资源ID",   OracleDbType.Varchar2, countNorm.RID == null?"":countNorm.RID,                         ParameterDirection.Input),
                new OracleParameter(":指标定义ID", OracleDbType.Varchar2, countNorm.ID == null?"":countNorm.ID,                           ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #5
0
        /// <summary>
        /// 新增资源目录
        /// </summary>
        /// <param name="resource">资源目录对象</param>
        /// <param name="dt">最后修改时间</param>
        /// <param name="nid">新GUID</param>
        public void CreateResource(Resource resource, DateTime dt, string nid)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"insert into 资源目录( 资源ID,
                                                 上级资源ID,
                                                 资源名称,
                                                 类型,
                                                 备注,
                                                 最后修改人,
                                                 最后修改时间,
                                                 显示名称,
                                                 是否树形,
                                                关系资源ID) 
                                        values(:资源ID,:上级资源ID,:资源名称,:类型,:备注,:最后修改人,:最后修改时间,:显示名称,:是否树形,:关系资源ID)";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":资源ID",   OracleDbType.Varchar2, nid,                                                ParameterDirection.Input),
                new OracleParameter(":上级资源ID", OracleDbType.Varchar2, resource.PID == null?"":resource.PID,               ParameterDirection.Input),
                new OracleParameter(":资源名称",   OracleDbType.Varchar2, resource.Name,                                      ParameterDirection.Input),
                new OracleParameter(":类型",     OracleDbType.Varchar2, resource.Type,                                      ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, resource.Note == null?"":resource.Note,             ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, resource.LastModify == null?"":resource.LastModify, ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                 ParameterDirection.Input),
                new OracleParameter(":显示名称",   OracleDbType.Varchar2, resource.ShowName,                                  ParameterDirection.Input),
                new OracleParameter(":是否树形",   OracleDbType.Long,     resource.TreeForm,                                  ParameterDirection.Input),
                new OracleParameter(":关系资源ID", OracleDbType.Varchar2, resource.RelationID == null?"":resource.RelationID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #6
0
        /// <summary>
        /// 新增主体权限
        /// </summary>
        /// <param name="mainAuthority">主体权限对象</param>
        /// <param name="dt">最后修改时间</param>
        /// <param name="nid">新GUID</param>
        public void CreateMainAuthority(MainAuthority mainAuthority, DateTime dt, string nid)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"insert into 主体权限( 主体权限ID,
                                                 主体ID,
                                                 主体名称,
                                                 类型,
                                                 角色ID,
                                                 权限类型,
                                                 最后修改人,
                                                 最后修改时间,
                                                 关联资源ID,                                                 
                                                关联资源明细ID) 
                                        values(:主体权限ID,:主体ID,:主体名称,:类型,:角色ID,:权限类型,:最后修改人,:最后修改时间,:关联资源ID,:关联资源明细ID)";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":主体权限ID",   OracleDbType.Varchar2, nid,                                                                ParameterDirection.Input),
                new OracleParameter(":主体ID",     OracleDbType.Varchar2, mainAuthority.MID == null?"":mainAuthority.MID,                     ParameterDirection.Input),
                new OracleParameter(":主体名称",     OracleDbType.Varchar2, mainAuthority.MainName == null?"":mainAuthority.MainName,           ParameterDirection.Input),
                new OracleParameter(":类型",       OracleDbType.Varchar2, mainAuthority.Type == null?"":mainAuthority.Type,                   ParameterDirection.Input),
                new OracleParameter(":角色ID",     OracleDbType.Varchar2, mainAuthority.RoleID == null?"":mainAuthority.RoleID,               ParameterDirection.Input),
                new OracleParameter(":权限类型",     OracleDbType.Varchar2, mainAuthority.AuthorityType == null?"":mainAuthority.AuthorityType, ParameterDirection.Input),
                new OracleParameter(":最后修改人",    OracleDbType.Varchar2, mainAuthority.LastModify == null?"":mainAuthority.LastModify,       ParameterDirection.Input),
                new OracleParameter(":最后修改时间",   OracleDbType.Date,     dt,                                                                 ParameterDirection.Input),
                new OracleParameter(":关联资源ID",   OracleDbType.Varchar2, mainAuthority.RID == null?"":mainAuthority.RID,                     ParameterDirection.Input),
                new OracleParameter(":关联资源明细ID", OracleDbType.Varchar2, mainAuthority.DID == null?"":mainAuthority.DID,                     ParameterDirection.Input)
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #7
0
        /// <summary>
        /// 根据ID删除资源目录
        /// </summary>
        /// <param name="ID">资源ID</param>
        public void DeleteResourceByID(string ResourceID)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"delete from 资源目录 where 资源ID=:资源ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":资源ID", OracleDbType.Varchar2, ResourceID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #8
0
        /// <summary>
        /// 根据要素ID删除要素信息
        /// </summary>
        /// <param name="EID">要素ID</param>
        public void DeleteElementByEID(string EID)
        {
            string           sql = @"delete 要素目录 where 要素ID = :EID";
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":EID", OracleDbType.Varchar2, EID, ParameterDirection.Input)
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #9
0
        /// <summary>
        /// 删除角色权限同步人员权限
        /// </summary>
        /// <param name="MAID">主体权限ID</param>
        public void DeletePerPersonnelAuthority(string MAID)
        {
            string           sql = "delete from 人员权限 where 主体权限ID = :MAID";
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":MAID", OracleDbType.Varchar2, MAID, ParameterDirection.Input)
            };
            oracleDataAccess.ExecuteNonQuery(sql, oracleParameters);
        }
Example #10
0
        /// <summary>
        /// 根据AID删除主体权限
        /// </summary>
        /// <param name="AID">主体权限ID</param>
        public void DeleteMainAuthorityByAID(string AID)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"delete from 主体权限 where 主体权限ID=:AID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":AID", OracleDbType.Varchar2, AID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #11
0
        /// <summary>
        /// 根据ID删除文本值域选项
        /// </summary>
        /// <param name="ID">选项值域ID</param>
        public void DeleteElementRangeByID(string ID)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"delete from 文本选项值域 where 选项值域ID=:选项值域ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":选项值域ID", OracleDbType.Varchar2, ID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #12
0
        /// <summary>
        /// 根据ID删除统计指标
        /// </summary>
        /// <param name="countNormID">指标定义ID</param>
        public void DeleteCountNormByID(string countNormID)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"delete from 统计指标定义 where 指标定义ID=:指标定义ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":指标定义ID", OracleDbType.Varchar2, countNormID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #13
0
        /// <summary>
        /// 删除角色用户同步人员权限
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <param name="RoleID">角色ID</param>
        public void DeletePA(string UserID, string RoleID)
        {
            string           sql = "delete from 人员权限 where 用户ID = :UserID and 角色ID = :RoleID";
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":UserID", OracleDbType.Varchar2, UserID, ParameterDirection.Input),
                new OracleParameter(":RoleID", OracleDbType.Varchar2, RoleID, ParameterDirection.Input)
            };
            oracleDataAccess.ExecuteNonQuery(sql, oracleParameters);
        }
Example #14
0
        /// <summary>
        /// 根据ID修改文本值域选项
        /// </summary>
        /// <param name="elementRange">ElementClassify对象</param>
        /// <param name="dt">最后修改时间</param>
        public void PutElementRangeByID(ElementRange elementRange, DateTime dt)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"update 文本选项值域  set  选项名称=:选项名称,
                                                 备注=:备注,
                                                 最后修改人=:最后修改人,
                                                 最后修改时间=:最后修改时间,
                                                 要素ID=:要素ID
                                             where 选项值域ID=:选项值域ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":选项名称",   OracleDbType.Varchar2, elementRange.Name == null?"":elementRange.Name, ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, elementRange.Note,                              ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, elementRange.LastModify,                        ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                             ParameterDirection.Input),
                new OracleParameter(":要素ID",   OracleDbType.Varchar2, elementRange.EID,                               ParameterDirection.Input),
                new OracleParameter(":选项值域ID", OracleDbType.Varchar2, elementRange.ID,                                ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #15
0
        /// <summary>
        /// 根据ID修改要素分类
        /// </summary>
        /// <param name="resource">ElementClassify对象</param>
        /// <param name="dt">最后修改时间</param>
        public void PutElementClassifyByID(ElementClassify elementClassify, DateTime dt)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"update 资源分类  set  资源ID=:资源ID,
                                                 分类名称=:分类名称,
                                                 备注=:备注,
                                                 最后修改人=:最后修改人,
                                                 最后修改时间=:最后修改时间
                                             where 资源分类ID=:资源分类ID";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":资源ID",   OracleDbType.Varchar2, elementClassify.RID == null?"":elementClassify.RID,               ParameterDirection.Input),
                new OracleParameter(":分类名称",   OracleDbType.Varchar2, elementClassify.Name,                                             ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, elementClassify.Note,                                             ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, elementClassify.LastModify == null?"":elementClassify.LastModify, ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                               ParameterDirection.Input),
                new OracleParameter(":资源分类ID", OracleDbType.Varchar2, elementClassify.ID,                                               ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #16
0
        /// <summary>
        /// 新增统计指标
        /// </summary>
        /// <param name="CountNorm">统计指标</param>
        /// <param name="dt">最后修改时间</param>
        /// <param name="nid">新GUID</param>
        public void CreateCountNorm(CountNorm countNorm, DateTime dt, string nid)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"insert into 统计指标定义( 指标定义id, 指标名称, 计算类型, 运算符, 运算值, 关联类型, 关联id, 备注, 最后修改人, 最后修改时间, 资源id) 
                                        values(:指标定义id, :指标名称, :计算类型, :运算符, :运算值, :关联类型, :关联id, :备注, :最后修改人, :最后修改时间, :资源id)";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":指标定义id", OracleDbType.Varchar2, nid,                                    ParameterDirection.Input),
                new OracleParameter(":指标名称",   OracleDbType.Varchar2, countNorm.NormName,                     ParameterDirection.Input),
                new OracleParameter(":计算类型",   OracleDbType.Varchar2, countNorm.CalculateType,                ParameterDirection.Input),
                new OracleParameter(":运算符",    OracleDbType.Varchar2, countNorm.Operator,                     ParameterDirection.Input),
                new OracleParameter(":运算值",    OracleDbType.Varchar2, countNorm.Ovalue,                       ParameterDirection.Input),
                new OracleParameter(":关联类型",   OracleDbType.Varchar2, countNorm.AssociationType,              ParameterDirection.Input),
                new OracleParameter(":关联id",   OracleDbType.Varchar2, countNorm.GLID,                         ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, countNorm.Note,                         ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, countNorm.LastModify,                   ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                     ParameterDirection.Input),
                new OracleParameter(":资源id",   OracleDbType.Varchar2, countNorm.RID == null?"":countNorm.RID, ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #17
0
        /// <summary>
        /// 新增要素分类
        /// </summary>
        /// <param name="elementClassify">ElementClassify对象</param>
        /// <param name="dt">最后修改时间</param>
        /// <param name="nid">新GUID</param>
        public void CreateElementClassify(ElementClassify elementClassify, DateTime dt, string nid)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"insert into 资源分类( 资源分类ID,
                                                 资源ID,
                                                 分类名称,
                                                 备注,
                                                 最后修改人,
                                                 最后修改时间
                                                ) 
                                        values(:资源分类ID,:资源ID,:分类名称,:备注,:最后修改人,:最后修改时间)";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":资源分类ID", OracleDbType.Varchar2, nid,                                                              ParameterDirection.Input),
                new OracleParameter(":资源ID",   OracleDbType.Varchar2, elementClassify.RID == null?"":elementClassify.RID,               ParameterDirection.Input),
                new OracleParameter(":分类名称",   OracleDbType.Varchar2, elementClassify.Name,                                             ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, elementClassify.Note,                                             ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, elementClassify.LastModify == null?"":elementClassify.LastModify, ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                                               ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }
Example #18
0
        /// <summary>
        /// 新增文本值域选项
        /// </summary>
        /// <param name="elementRange">ElementRange对象</param>
        /// <param name="dt">最后修改时间</param>
        /// <param name="nid">新GUID</param>
        public void CreateElementRange(ElementRange elementRange, DateTime dt, string nid)
        {
            OracleDataAccess oracleDataAccess = new OracleDataAccess(SiteConfig.OracleConn);
            string           sql = @"insert into 文本选项值域( 选项值域ID,
                                                     选项名称,
                                                     备注,
                                                     最后修改人,
                                                     最后修改时间,
                                                     要素ID
                                                ) 
                                        values(:选项值域ID,:选项名称,:备注,:最后修改人,:最后修改时间,:要素ID)";

            OracleParameter[] oracleParameters =
            {
                new OracleParameter(":选项值域ID", OracleDbType.Varchar2, nid,                                            ParameterDirection.Input),
                new OracleParameter(":选项名称",   OracleDbType.Varchar2, elementRange.Name == null?"":elementRange.Name, ParameterDirection.Input),
                new OracleParameter(":备注",     OracleDbType.Varchar2, elementRange.Note,                              ParameterDirection.Input),
                new OracleParameter(":最后修改人",  OracleDbType.Varchar2, elementRange.LastModify,                        ParameterDirection.Input),
                new OracleParameter(":最后修改时间", OracleDbType.Date,     dt,                                             ParameterDirection.Input),
                new OracleParameter(":要素ID",   OracleDbType.Varchar2, elementRange.EID,                               ParameterDirection.Input),
            };
            oracleDataAccess.ExecuteNonQuery(sql, System.Data.CommandType.Text, oracleParameters);
        }