示例#1
0
        ///// <summary>
        ///// 根据仓库查询仓位信息
        ///// </summary>
        //public DataTable QueryRepertoryLocationInfo(int repertoryIdInt)
        //{
        //    string sqlStr = string.Format("select BS_RepertoryLocationInfo.AutoId, LocationNo, LocationName, RepertoryName from BS_RepertoryLocationInfo left join BS_RepertoryInfo on BS_RepertoryLocationInfo.RepertoryId = BS_RepertoryInfo.AutoId where RepertoryId = {0} Order by AutoId", repertoryIdInt);
        //    return BaseSQL.GetTableBySql(sqlStr);
        //}

        /// <summary>
        /// 查询货架信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryShelfInfo(bool addAllItem)
        {
            string sqlStr = "select BS_ShelfInfo.AutoId, ShelfNo, ShelfLocation, RepertoryLocationId, LocationName from BS_ShelfInfo left join BS_RepertoryLocationInfo on BS_ShelfInfo.RepertoryLocationId = BS_RepertoryLocationInfo.AutoId Order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '全部' as ShelfNo, '全部' as ShelfLocation, 0 as RepertoryLocationId, '全部' as LocationName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#2
0
        /// <summary>
        /// 查询项目状态信息
        /// </summary>
        public DataTable QueryProjectStatus(bool addAllItem)
        {
            string sqlStr = "select AutoId, StatusText, IsDefault from BS_ProjectStatus order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '全部' as StatusText, 0 as IsDefault union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#3
0
        /// <summary>
        /// 查询审批类型信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryApprovalType(bool addAllItem)
        {
            string sqlStr = "select AutoId, TypeNo, TypeNoText, ApprovalCat, ApprovalText from V_PUR_ApprovalType Order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as TypeNo, '" + f.tsmiQb + "' as TypeNoText, 0 as ApprovalCat, '' as ApprovalText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#4
0
        /// <summary>
        /// 查询零件分类表
        /// </summary>
        public DataTable QueryPartNoCatg(bool addAllItem)
        {
            string sqlStr = "select AutoId, CatgName, CatgDescription from SW_PartNoCatg order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as CatgName, '" + f.tsmiQb + "' as CatgDescription union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#5
0
        /// <summary>
        /// 查询加工等级表
        /// </summary>
        public DataTable QueryLevelCatg(bool addAllItem)
        {
            string sqlStr = "select AutoId, LevelCatg, CatgOrder from SW_LevelCatg order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as LevelCatg, 0 as CatgOrder union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#6
0
        /// <summary>
        /// 查询材料信息表
        /// </summary>
        public DataTable QueryMaterialSelectLib(bool addAllItem)
        {
            string sqlStr = "select AutoId, LibName, MaterialCategory, MaterialName from SW_MaterialSelectLib order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as LibName, '" + f.tsmiQb + "' as MaterialCategory, '" + f.tsmiQb + "' as MaterialName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#7
0
        /// <summary>
        /// 查询品牌信息表
        /// </summary>
        public DataTable QueryBrandCatg(bool addAllItem)
        {
            string sqlStr = "select AutoId, BrandNo, BrandName from SW_BrandCatg order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as BrandNo, '" + f.tsmiQb + "' as BrandName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#8
0
        /// <summary>
        /// 查询单位信息表
        /// </summary>
        public DataTable QueryUnitCatg(bool addAllItem)
        {
            string sqlStr = "select AutoId, UnitNo, UnitName from BS_UnitCatg order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as UnitNo, '" + f.tsmiQb + "' as UnitName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#9
0
        /// <summary>
        /// 查询物料信息表
        /// </summary>
        public DataTable QueryPartsCode(bool addAllItem)
        {
            string sqlStr = "select AutoId, CodeFileName, CodeName from SW_PartsCode order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as CodeFileName, '" + f.tsmiQb + "' as CodeName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#10
0
        /// <summary>
        /// 查询采购类型(增加一个全部选项)
        /// </summary>
        public DataTable QueryPurCategory(bool addAllItem)
        {
            string sqlStr = "select AutoId, PurCategory, PurCategoryText from PUR_PurCategory order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '' as PurCategory, '" + f.tsmiQb + "' as PurCategoryText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#11
0
        /// <summary>
        /// 查询往来方信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryBussinessBaseInfo(bool addAllItem)
        {
            string sqlStr = "select Info.AutoId, Info.BussinessBaseNo, Info.BussinessBaseText, Cate.BussinessCategoryText from BS_BussinessBaseInfo as Info left join BS_BussinessCategory as Cate on Info.BussinessCategory=Cate.BussinessCategory Order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as BussinessBaseNo, '" + f.tsmiQb + "' as BussinessBaseText, '" + f.tsmiQb + "' as BussinessCategoryText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#12
0
        /// <summary>
        /// 查询收款类型信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryCollectionType(bool addAllItem)
        {
            string sqlStr = "select AutoId, CollectionTypeNo, CollectionTypeNoText from BS_CollectionType Order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as CollectionTypeNo, '" + f.tsmiQb + "' as CollectionTypeNoText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#13
0
        /// <summary>
        /// 查询币种列表
        /// </summary>
        public DataTable QueryCurrencyCate(bool addAllItem)
        {
            string sqlStr = "select AutoId, CurrencyCateAbb, CurrencyCateName, ExchangeRate from BS_CurrencyCate order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '' as CurrencyCateAbb, '全部' as CurrencyCateName, 1 as ExchangeRate union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#14
0
        /// <summary>
        /// 查询BOM物料状态表
        /// </summary>
        public DataTable QueryBomMaterieState(bool addAllItem)
        {
            string sqlStr = "select AutoId, MaterieStateId, MaterieStateText from BS_BomMaterieState order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, 0 as MaterieStateId, '全部' as MaterieStateText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#15
0
        /// <summary>
        /// 查询角色信息
        /// </summary>
        public DataTable QueryRole(bool addAllItem)
        {
            string sqlStr = "select AutoId, RoleNo, RoleName from BS_Role order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '全部' as RoleNo, '全部' as RoleName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#16
0
        /// <summary>
        /// 查询操作员信息
        /// </summary>
        public DataTable QueryUserInfo_OnlyColumn(bool addAllItem)
        {
            string sqlStr = "select AutoId, EmpName from BS_UserInfo order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as EmpName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#17
0
        /// <summary>
        /// 查询操作员信息(不包含停用)
        /// </summary>
        public DataTable QueryUserInfo_NoDisable(bool addAllItem)
        {
            string sqlStr = "select AutoId, LoginId, EmpName from BS_UserInfo where ISNULL(IsDisable, 0) = 0 order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '全部' as LoginId, '全部' as EmpName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#18
0
        /// <summary>
        /// 查询操作员信息
        /// </summary>
        public DataTable QueryUserInfo(bool addAllItem)
        {
            string sqlStr = "select BS_UserInfo.AutoId, LoginId, EmpName, DepartmentName from BS_UserInfo left join BS_Department on BS_UserInfo.DepartmentNo = BS_Department.DepartmentNo order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '全部' as LoginId, '全部' as EmpName, '' as DepartmentName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#19
0
        /// <summary>
        ///  获取表顶层标题数据
        /// </summary>
        /// <param name="iQuerySqlId"></param>
        /// <param name="iTabIndex"></param>
        /// <returns></returns>
        public static DataTable GetTopTableHeaderData(int iQuerySqlId, int iTabIndex)
        {
            int    iTmp = GetDataSettingId(iQuerySqlId, iTabIndex);
            string sql  = "select * from BS_DataHeaderSetting where ParentHeaderName is null " +
                          "and QuerySql=" + iQuerySqlId + " and DataSetting=" + iTmp;

            DataTable dt = BaseSQL.GetTableBySql(sql);

            return(dt);
        }
示例#20
0
        /// <summary>
        /// 获得部门列表
        /// </summary>
        /// <returns></returns>
        public static DataTable getDepartmentList()
        {
            string sqlString = "select distinct a.DepartmentName,a.DepartmentNo " +
                               "from BS_Department a " +
                               "union " +
                               "select '','' from BS_Department b ";
            DataTable dtblTmp = new DataTable();

            dtblTmp = BaseSQL.GetTableBySql(sqlString);
            return(dtblTmp);
        }
示例#21
0
        public static DataTable getThemeInfo()
        {
            string n         = PSAP.Properties.Settings.Default.ThemeId;
            string sqlString = "select a.ThemeId,b.ThemeDescribe,a.ControlName,a.ControlProperty,a.ControlValue,a.ControlType " +
                               "from BS_ThemeDetail a left join BS_Theme b on a.ThemeId=b.AutoId " +
                               "where convert(varchar(10),a.ThemeId) like '" + n + "' and a.ControlValue<>'-' ";
            DataTable dtblTmp = new DataTable();

            dtblTmp = BaseSQL.GetTableBySql(sqlString);
            return(dtblTmp);
        }
示例#22
0
        /// <summary>
        /// 查询国家编码全部表(增加一个全部选项)
        /// </summary>
        public DataTable QueryCountryCode(bool addAllItem)
        {
            string sqlStr = "select CountryCode, CountryName from BS_CountryCodeManagement order by CountryCode";

            if (addAllItem)
            {
                //sqlStr = "select '全部' as CountryCode, '全部' as CountryName union " + sqlStr;
                sqlStr = "select '" + f.tsmiQb.Text + "' as CountryCode, '" + f.tsmiQb.Text + "' as CountryName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#23
0
        /// <summary>
        /// 查询制造工程信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryManufactureInfo(bool addAllItem)
        {
            string sqlStr = "select AutoId, ManufactureNo, ManufactureName, ManufactureType, ManufactureTypeText from V_BS_ManufactureInfo Order by AutoId";

            if (addAllItem)
            {
                //sqlStr = "select 0 as AutoId, '全部' as ManufactureNo, '全部' as ManufactureName, 1 as ManufactureType, '正常' as ManufactureTypeText union " + sqlStr;
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb.Text + "' as ManufactureNo, '" + f.tsmiQb.Text + "' as ManufactureName, 1 as ManufactureType, '" + f.tsmiZc.Text + "' as ManufactureTypeText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#24
0
        /// <summary>
        /// 获得角色列表
        /// </summary>
        /// <returns></returns>
        public static DataTable getRoleList()
        {
            string sqlString = "select distinct a.RoleNo,a.RoleName " +
                               "from BS_Role a " +
                               "union " +
                               "select '','' from BS_Role b ";
            DataTable dtblTmp = new DataTable();

            dtblTmp = BaseSQL.GetTableBySql(sqlString);
            return(dtblTmp);
        }
示例#25
0
        /// <summary>
        /// 查询部门信息全部表(增加一个全部选项)
        /// </summary>
        public DataTable QueryDepartment_AllNode(bool addAllItem)
        {
            string sqlStr = "select AutoId, DepartmentNo, DepartmentName from BS_Department order by AutoId";

            if (addAllItem)
            {
                //sqlStr = "select 0 as AutoId, '' as DepartmentNo, '全部' as DepartmentName union " + sqlStr;
                sqlStr = "select 0 as AutoId, '' as DepartmentNo, '" + f.tsmiQb + "' as DepartmentName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#26
0
        /// <summary>
        /// 查询往来方类别全部表(增加一个全部选项)
        /// </summary>
        public DataTable QueryBussinessCategory(bool addAllItem)
        {
            string sqlStr = "select AutoId, BussinessCategory, BussinessCategoryText from BS_BussinessCategory order by AutoId";

            if (addAllItem)
            {
                //sqlStr = "select 0 as AutoId, '' as BussinessCategory, '全部' as BussinessCategoryText union " + sqlStr;
                sqlStr = "select 0 as AutoId, '' as BussinessCategory,'" + f.tsmiQb.Text + "' as BussinessCategoryText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#27
0
        /// <summary>
        /// 查询货架信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryShelfInfo(bool addAllItem)
        {
            string sqlStr = "select AutoId, ShelfNo, ShelfLocation from BS_ShelfInfo Order by AutoId";

            if (addAllItem)
            {
                //sqlStr = "select 0 as AutoId, '全部' as ShelfNo, '全部' as ShelfLocation union " + sqlStr;
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as ShelfNo, '" + f.tsmiQb + "' as ShelfLocation union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#28
0
        /// <summary>
        /// 查询部门信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryDepartment(bool addAllItem)
        {
            //string sqlStr = "select 0 as AutoId, '' as DepartmentNo, '全部' as DepartmentName union select AutoId, DepartmentNo, DepartmentName from BS_Department";
            string sqlStr = "select AutoId, DepartmentNo, DepartmentName from BS_Department where DepartmentNo not in (select IsNull(ParentDepartmentNo,'') from BS_Department) order by AutoId";

            if (addAllItem)
            {
                sqlStr = "select 0 as AutoId, '' as DepartmentNo, '" + f.tsmiQb + "' as DepartmentName union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#29
0
        /// <summary>
        /// 查询仓库信息(增加一个全部选项)
        /// </summary>
        public DataTable QueryRepertoryInfo(bool addAllItem)
        {
            string sqlStr = "select AutoId, RepertoryNo, RepertoryName, RepertoryType, RepertoryTypeText from V_BS_RepertoryInfo Order by AutoId";

            if (addAllItem)
            {
                //sqlStr = "select 0 as AutoId, '全部' as RepertoryNo, '全部' as RepertoryName, 1 as RepertoryType, '正常' as RepertoryTypeText union " + sqlStr;
                sqlStr = "select 0 as AutoId, '" + f.tsmiQb + "' as RepertoryNo, '" + f.tsmiQb + "' as RepertoryName, 1 as RepertoryType, '" + f.tsmiZc.Text + "' as RepertoryTypeText union " + sqlStr;
            }
            return(BaseSQL.GetTableBySql(sqlStr));
        }
示例#30
0
        /// <summary>
        /// 获得窗口语种设定数据
        /// </summary>
        /// <param name="strFormName"></param>
        /// <returns></returns>
        public static DataTable GetFormLanuageData(string strFormName)
        {
            string iniPath  = AppDomain.CurrentDomain.SetupInformation.ApplicationBase.TrimEnd('\\') + "\\Config.ini";
            string language = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLanguage");
            string sql      =
                "select AutoId,FormName,ControlsCategory,ControlsName,ControlsProperties," + language + " as LanguageText " +
                "from BS_LanguageSetting " +
                "where FormName like '" + strFormName + "'";
            DataTable dt = BaseSQL.GetTableBySql(sql);

            return(dt);
        }