コード例 #1
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            pro96.CardNo = Model.CarNo;
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            //标签类型
            pro96.EpcType = "5";
            Model.CarCode = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }
コード例 #2
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            //种植场号
            pro96.CompanyCode = Model.CompanyID.ToString();
            pro96.CompanyType = "1";
            pro96.Driver      = Model.DriverName.ToString();
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            //标签类型
            pro96.EpcType   = "6";
            Model.DriverEPC = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }
コード例 #3
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            //种植场号
            pro96.BusinessCode = Model.Company.CompanyID.ToString();
            //批次号
            pro96.GoodsCode = Model.KillBatchID.ToString();
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            var maxId = iCodeMaxService.GetMaxCode("KillCull");

            //序号
            pro96.SeqNo = maxId;
            //标签类型
            pro96.EpcType = "3";
            Model.KillEpc = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }
コード例 #4
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult SavePlanData(PlansBatchModel model)
        {
            var result = new ResultJson();

            try
            {
                CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();
                //种植场号
                pro96.BusinessCode = "3";
                //批次号
                pro96.BatchNo = model.BatchNO;
                //生成日期
                pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
                var maxId = _codeMaxService.GetMaxCode("PlansBatch");
                //序号
                pro96.SeqNo = maxId;
                //标签类型
                pro96.EpcType   = "3";
                model.BatchCode = pro96.PackEpc();

                var msg = new MessageModel();
                if (model.BatchID == 0)
                {
                    msg = _plansBatchService.InsertSinglePlansBatch(model);
                }
                else
                {
                    msg = _plansBatchService.UpdateSinglePlansBatch(model);
                }

                if (msg.Status == MessageStatus.Success)
                {
                    result.IsSuccess = true;
                }
            }
            catch (Exception)
            {
                throw;
            }


            return(Json(result));
        }
コード例 #5
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            //种植场号
            pro96.BusinessCode = "3";
            //批次号
            pro96.BatchNo = "";
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            var maxId = iCodeMaxService.GetMaxCode("PlansBatch");

            //序号
            pro96.SeqNo = maxId;
            //标签类型
            pro96.EpcType   = "3";
            Model.BatchCode = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }
コード例 #6
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            //养殖场号
            pro96.BusinessCode = Model.BreedHome == null ? "0":Model.BreedHome.HomeID.ToString();
            //批次号
            pro96.BatchNo = Model.BatchCode;
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            var maxId = iCodeMaxService.GetMaxCode("CultivationBase");

            //序号
            pro96.SeqNo = maxId;
            //标签类型
            pro96.EpcType        = "1";
            Model.CultivationEpc = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }
コード例 #7
0
        public void LoadUserControl(ChipEditView view)
        {
            m_SyncContext = SynchronizationContext.Current;

            ChipEditViewSelf = view;

            var companys = iCompanyService.GetPagerCompany("", 1, 100);

            Companys = new BindableCollection <CompanyModel>(companys);
            NotifyOfPropertyChange(() => Companys);
            if (Mode == EditMode.CREATE)
            {
                ReaderHelper reader1  = new ReaderHelper();
                var          portName = view.cbPort.Text;
                Model.ChipCode = reader1.Read(portName);
                var           maxId = MaxId;
                CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();
                //商品类别
                pro96.GoodsType = "3";
                //商品代号
                pro96.GoodsCode = maxId;
                //生成日期
                pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
                //销售店号
                pro96.BusinessCode = maxId;
                //商品号型
                pro96.GoodsSize = "255";
                //序号
                pro96.SeqNo = maxId;

                pro96.EpcType = "4";
                Model.Epc     = pro96.PackEpc();
                NotifyOfPropertyChange(() => Model);
            }


            Task.Factory.StartNew(() =>
            {
                m_SyncContext.Post(AsyncGetPortList, view);
            });
        }
コード例 #8
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult SaveKillCullData(KillCullModel model)
        {
            var result = new ResultJson();

            try
            {
                CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();
                //种植场号
                pro96.BusinessCode = UserManagement.CurrentUser.CompanyId.ToString();
                //批次号
                pro96.GoodsCode = model.KillBatchID.ToString();
                //生成日期
                pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
                var maxId = _codeMaxService.GetMaxCode("KillCull");
                //序号
                pro96.SeqNo = maxId;
                //标签类型
                pro96.EpcType = "3";
                model.KillEpc = pro96.PackEpc();

                model.CompanyID = UserManagement.CurrentUser.CompanyId;
                var msg = new MessageModel();
                if (model.KillCullID == 0)
                {
                    msg = _killCullService.InsertSingleKillCull(model);
                }
                else
                {
                    msg = _killCullService.UpdateSingleKillCull(model);
                }
                if (msg.Status == MessageStatus.Success)
                {
                    result.IsSuccess = true;
                }
            }
            catch (Exception)
            {
            }

            return(Json(result));
        }
コード例 #9
0
        public void EpcGotFocus()
        {
            CPRODUCTEPC96 pro96 = new CPRODUCTEPC96();

            //商品类别
            pro96.GoodsType = "3";
            //商品代号
            pro96.GoodsCode = Model.ProductID.ToString();
            //生成日期
            pro96.TagDate = DateTime.Now.ToString("yyyy年MM月dd日");
            var maxId = iCodeMaxService.GetMaxCode("ShadowBase");

            //销售店号
            pro96.BusinessCode = maxId;
            //商品号型
            pro96.GoodsSize = "255";
            //序号
            pro96.SeqNo = maxId;

            pro96.EpcType   = "4";
            Model.ShadowEPC = pro96.PackEpc();
            NotifyOfPropertyChange(() => Model);
        }