Пример #1
0
        // public readonly string Sql = "select a.name,a.length,b.name from syscolumns a,   systypes   b,sysobjects   c where   a.xtype=b.xtype   and   a.id=c.id   and   c.name= 'HR_Stuff '";
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="ModuleCode">模板编码</param>
        /// <param name="NameSpace">命名空间</param>
        public SqlINSERT(string ModuleCode, string NameSpace)
        {
            this.ModuleCode = ModuleCode;
            this.NameSpace  = NameSpace;
            string Sql      = "SELECT  cf.D_Index,cf.D_Type,clp.M_TableName,cf.D_EditHidden,cf.D_DefaultValue FROM Config_Fieled cf,Config_ListPage clp WHERE cf.D_ModuleCode='" + this.ModuleCode + "' AND cf.D_NameSpace='" + this.NameSpace + "' AND ( Cf.D_EditHidden!='true' or Cf.D_EditHidden is null )AND  clp.M_ModuleCode=cf.D_ModuleCode AND clp.M_NameSpace=cf.D_NameSpace";
            string SqlValue = "SELECT top 1 cf.D_Index,cf.D_DefaultValue FROM Config_Fieled cf,Config_ListPage clp WHERE cf.D_ModuleCode='Document_LendingModule' AND cf.D_NameSpace='Document_Lending' AND ( Cf.D_EditHidden!='true' or Cf.D_EditHidden is null )AND  clp.M_ModuleCode=cf.D_ModuleCode AND clp.M_NameSpace=cf.D_NameSpace AND cf.D_DefaultValue  is not null";

            dt           = idb.ReturnDataTable(Sql);
            dts          = idb.ReturnDataTable(SqlValue);
            DefaultValue = dts.Rows.Count.Equals(0) ? null : dts.Rows[0][1].ToString();
        }