コード例 #1
0
ファイル: CachePool.cs プロジェクト: kkmeteor/StudyProjects
        private void Create(LevelExpandEnum levelExpand)
        {
            string strSQL = string.Empty;

            DataSet ds = null;

            if (levelExpand == LevelExpandEnum.AreaClass)
            {
                strSQL = "Select  cDCCode as cCode, cDCName  as 地区 from  DistrictClass";
            }
            else if (levelExpand == LevelExpandEnum.CustClass)
            {
                strSQL = "select  cCCCode as cCode , cCCName as 客户分类 from  CustomerClass";
            }
            else if (levelExpand == LevelExpandEnum.DepLevel)
            {
                strSQL = "Select cDepCode as cCode, cDepName as cname from Department";
            }
            else if (levelExpand == LevelExpandEnum.DispLevel)
            {
                strSQL = "Select  cRdCode as cCode,cRdName as cname  from  Rd_Style";
            }
            else if (levelExpand == LevelExpandEnum.GoodClass)
            {
                strSQL = "Select  cInvCCode as cCode,cInvCname as cname from inventoryClass";
            }
            else if (levelExpand == LevelExpandEnum.GradeLevel)
            {
                strSQL = "Select  cCode as cCode, cCode_name  as cname from  Code";
            }
            else if (levelExpand == LevelExpandEnum.PosLevel)
            {
                strSQL = "Select  cPosCode as cCode, cPosName  as cname  from  Position";
            }
            else if (levelExpand == LevelExpandEnum.ProvClass)
            {
                strSQL = "Select  cVCCode as cCode, cVCName as cname from  vendorClass";
            }
            else if (levelExpand == LevelExpandEnum.SettleLevel)
            {
                strSQL = "Select  cSSCode as cCode, cSSName  as  cname from  SettleStyle";
            }
            else if (levelExpand == LevelExpandEnum.fa_SourceClass)//资金构成分类
            {
                strSQL = "select sCCode as cCode,sCName  as  cname from fa_SourceClass";
            }
            else
            {
                _expandProgram = new ExpandProgram(U8LoginInfor);
                strSQL         = _expandProgram.RetriveDifinitionSQL(Convert.ToInt32(levelExpand));
            }
            ds = SqlHelper.ExecuteDataSet(this.U8LoginInfor.UfDataCnnString, strSQL);

            LevelExpandDataTable leds = new LevelExpandDataTable(ds.Tables[0]);

            dataSetObjects.Add(levelExpand, leds);
        }
コード例 #2
0
        public string GetLevelItemCaption(LevelExpandEnum levelExpandType)
        {
            // string localeId = this.U8LoginInfor.LocaleID;
            string caption = string.Empty;

            if (levelExpandType == LevelExpandEnum.AreaClass)
            {
                caption = "U8.SO.ReportServer.clssetdataprovider.00086";
            }
            else if (levelExpandType == LevelExpandEnum.CustClass)
            {
                caption = "U8.GL.ZWSQL.CODEACC.00766";
            }
            else if (levelExpandType == LevelExpandEnum.DepLevel)
            {
                caption = "U8.BPM.DSS.U8GDP.SaleOrderLabDept001";
            }
            else if (levelExpandType == LevelExpandEnum.DispLevel)
            {
                caption = "U8.CW.GL.ZZTool.frmPzYr.MenuPop.menuSFLB.Caption";
            }
            else if (levelExpandType == LevelExpandEnum.GoodClass)
            {
                caption = "U8.AA.ARCHIVE.FIELD.cinvcls";
            }
            else if (levelExpandType == LevelExpandEnum.GradeLevel)
            {
                caption = "U8.AA.ARCHIVE.code";
            }
            else if (levelExpandType == LevelExpandEnum.PosLevel)
            {
                caption = "U8.AA.ARCHIVE.FIELD.ref_cposcode";
            }
            else if (levelExpandType == LevelExpandEnum.ProvClass)
            {
                caption = "U8.AA.ARCHIVE.FIELD.cvencls";
            }
            else if (levelExpandType == LevelExpandEnum.SettleLevel)
            {
                caption = "U8.AA.EAI.XML.Operation.Dir.0014";
            }
            else if (levelExpandType == LevelExpandEnum.fa_SourceClass)//资金构成分类
            {
                caption = "U8.UAP.Services.ReportExhibition.ReportExpandWindow.资金构成分类";
            }
            else
            {
                _expandProgram = new ExpandProgram(u8LoginInfor);
                caption        = _expandProgram.RetriveItemCaption(Convert.ToInt32(levelExpandType));
            }

            return(caption);
        }
コード例 #3
0
        public string RetrieveCodeRule(U8LoginInfor login)
        {
            if (this._codeRule == string.Empty)
            {
                string  strSQL = string.Empty;
                DataSet ds     = null;

                if (this._expandType == LevelExpandEnum.AreaClass)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cAreaClass'";
                }
                else if (this._expandType == LevelExpandEnum.CustClass)
                {
                    strSQL = "select  cValue  from  accinformation where  csysid ='aa' and cname ='cCustClass'";
                }
                else if (this._expandType == LevelExpandEnum.DepLevel)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cDepLevel'";
                }
                else if (this._expandType == LevelExpandEnum.DispLevel)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cDispLevel'";
                }
                else if (this._expandType == LevelExpandEnum.GoodClass)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cGoodClass'";
                }
                else if (this._expandType == LevelExpandEnum.GradeLevel)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cGradeLevel'";
                }
                else if (this._expandType == LevelExpandEnum.PosLevel)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cPosLevel'";
                }
                else if (this._expandType == LevelExpandEnum.ProvClass)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cProvClass'";
                }
                else if (this._expandType == LevelExpandEnum.SettleLevel)
                {
                    strSQL = "select cValue from accinformation where  csysid ='aa' and cname ='cSettleLevel'";
                }
                else if (this._expandType == LevelExpandEnum.fa_SourceClass)//资金构成分类
                {
                    strSQL = "select CODINGRULE cValue from GradeDef_base where keyword='fa_SourceClass'";
                }
                //string strConn = "user id=sa; password=1; database=UFDATA_777_2005; server=zblpwin;";
                // ds = SqlHelper.ExecuteDataSet(strConn, strSQL);
                else
                {
                    _expandProgram = new ExpandProgram(login);
                    strSQL         = _expandProgram.RetriveRuleSQL(Convert.ToInt32(_expandType));
                    if (string.IsNullOrEmpty(strSQL))
                    {
                        //throw new Exception("No Difinition!");
                        return("");
                    }
                }
                ds = SqlHelper.ExecuteDataSet(login.UfDataCnnString, strSQL);
                if (ds.Tables[0].Rows.Count == 0)//资金构成分类
                {
                    return("");
                }
                this._codeRule = ds.Tables[0].Rows[0][0].ToString();
            }
            return(this._codeRule);
        }