コード例 #1
0
        public int fun2(string _assetExpression, out DataTable _table)
        {
            AppInit.Init();
            string sql = string.Format(@"select  Assets.assetsBarcode,
                                        Assets.assetsName,
                                        AssetsClass.assetsClassName assetsClassName,
                                        Assets.assetsNo,  
                                        D.departmentName departmentName,  
                                         StoreSite.storeSiteName storeSiteName,  
                                        Assets.spec,
                                        Assets.purchaseDate,
                                        {1} DuetoDate,
                                        A.userName usePeopleName,  
                                        B.userName keeperName,  
                                       (select departmentName from AppDepartment C where D.companyId=C.departmentId ) CompanyName
                                        from Assets
                                        left join AppDepartment D on D.departmentId=Assets.departmentId
                                        left join StoreSite on StoreSite.storeSiteId=Assets.storeSiteId 
                                        left join AssetsUses on AssetsUses.assetsUsesId=Assets.assetsUsesId 
                                        left join AssetsClass on AssetsClass.assetsClassId=Assets.assetsClassId
                                        left join EquityOwner on EquityOwner.equityOwnerId=Assets.equityOwnerId
                                        left join ProjectManage on ProjectManage.projectManageId=Assets.projectManageId
                                        left join AppUser A on A.userId=Assets.usePeople 
                                        left join AppUser B on B.userId=Assets.keeper  where 1=1 {0}", _assetExpression, DuetoDateSql());

            _table           = AppMember.DbHelper.GetDataSet(sql).Tables[0];
            _table.TableName = "Assets";
            return(1);
        }
コード例 #2
0
        [WebMethod] // 删除指定模板
        public int fun10(int _class, string _LabelId)
        {
            AppInit.Init();
            DataUpdate             dbUpdate = new DataUpdate();
            BarcodePrintRepository rep      = new BarcodePrintRepository();

            try
            {
                dbUpdate.BeginTransaction();
                rep.DbUpdate = dbUpdate;
                string labelType = "";
                if (_class == 0)
                {
                    labelType = "Z";
                }
                else
                {
                    labelType = "C";
                }
                rep.DeleteStyle(labelType, _LabelId, "Print Tools Update");
                dbUpdate.Commit();
                return(1);
            }
            catch (Exception)
            {
                dbUpdate.Rollback();
                return(0);
            }
            finally
            {
                dbUpdate.Close();
            }
        }
コード例 #3
0
        [WebMethod] // 取得所有模板数据.LabelId, LabelName, LabelContent, IsDefault
        public int fun7(int _class, out DataTable _table)
        {
            AppInit.Init();
            BarcodePrintRepository repository = new BarcodePrintRepository();

            if (_class == 0)
            {
                _table = repository.GetLabelStyleByPrintTools("Z");
            }
            else
            {
                _table = repository.GetLabelStyleByPrintTools("C");
            }
            return(1);
        }
コード例 #4
0
        public int fun5(int _class, out string _labelStyle)
        {
            AppInit.Init();
            BarcodePrintRepository repository = new BarcodePrintRepository();

            if (_class == 0)
            {
                _labelStyle = repository.GetLabelStyleByType("Z");
            }
            else
            {
                _labelStyle = repository.GetLabelStyleByType("C");
            }
            return(1);
        }
コード例 #5
0
        public int fun4(string _storeSiteExpression, out DataTable _table)
        {
            AppInit.Init();
            string sql = string.Format(@"select 
                                 StoreSite.storeSiteNo storeSiteNo,
                                 StoreSite.storeSiteName storeSiteName,
                                 T.storeSiteName parentStoreSiteName,
                                 D.departmentName companyName
                          from StoreSite left join AppUser U1 on StoreSite.createId=U1.userId
                                    left join AppUser U2 on StoreSite.updateId=U2.userId 
                                    left join StoreSite T on StoreSite.parentId=T.storeSiteId
                                    left join AppDepartment D on StoreSite.companyId=D.departmentId
                          where 1=1 {0}", _storeSiteExpression);

            _table = AppMember.DbHelper.GetDataSet(sql).Tables[0];
            return(1);
        }
コード例 #6
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            AppInit.Init();
            AppLog.DeleteLog();
            Thread thread = new Thread(new ThreadStart(AutoDepreciationTask));

            thread.Start();

            Thread thread2 = new Thread(new ThreadStart(AutoDBBackUpTask));

            thread2.Start();

            Thread thread3 = new Thread(new ThreadStart(AutoMonthUpdateTask));

            thread3.Start();
        }
コード例 #7
0
 public AutoTask()
 {
     AppInit.Init();
 }