Exemple #1
0
        public static long PdaInsertAndCheck(FrozenInStore dmo)
        {
            if (!BLContext.User.IsInRole("B3Butchery.产出单.新建"))
            {
                return(0);
            }
            if (!BLContext.User.IsInRole("B3Butchery.产出单.审核"))
            {
                return(-1);
            }
            SetSecondNumberByNumber(dmo);
            using (var context = new TransactionContext())
            {
                var bl = BIFactory.Create <IFrozenInStoreBL>(context.Session);
                dmo.Date = dmo.Date ?? DateTime.Today;

                dmo.Employee_ID = B3ButcheryUtil.GetCurrentBindingEmployeeID(context.Session);
                bl.InitNewDmo(dmo);
                bl.Insert(dmo);
                bl.Check(dmo);
                context.Commit();
            }

            return(dmo.ID);
        }
Exemple #2
0
        public static long PdaInsert(ProduceOutput dmo)
        {
            using (var context = new TransactionContext())
            {
                var bl = BIFactory.Create <IProduceOutputBL>(context.Session);
                dmo.Time          = DateTime.Today;
                dmo.IsHandsetSend = true;
                dmo.Employee_ID   = B3ButcheryUtil.GetCurrentBindingEmployeeID(context.Session);
                //        bl.InitNewDmo(dmo); 板块信息由手持机传入
                bl.Insert(dmo);
                bl.Check(dmo);
                context.Commit();
            }

            return(dmo.ID);
        }
Exemple #3
0
        public static long PdaInsertAndCheck(ProduceOutput dmo)
        {
            SetSecondNumberByNumber(dmo);
            using (var context = new TransactionContext())
            {
                var bl = BIFactory.Create <IProduceOutputBL>(context.Session);
                dmo.Time = dmo.Time ?? DateTime.Today;

                dmo.Employee_ID = B3ButcheryUtil.GetCurrentBindingEmployeeID(context.Session);
                bl.InitNewDmo(dmo);
                bl.Insert(dmo);
                bl.Check(dmo);
                context.Commit();
            }

            return(dmo.ID);
        }