Пример #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                InventoryP vo = e.Argument as InventoryP;
                if (vo == null)
                {
                    return;
                }

                InventoryResult result = null;
                if (vo.Type == 0)
                {
                    result = Inventory(vo);
                }
                else
                {
                    result = InventoryBack(vo);
                }

                e.Result = result;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        protected InventoryResult Inventory(InventoryP vo)
        {
            FishBll.Bll.InventoryBll bll = new FishBll.Bll.InventoryBll();
            int             result       = bll.Inventory(vo.Date, vo.Man);
            InventoryResult r            = new InventoryResult();

            r.result = result;
            r.type   = vo.Type;
            return(r);
        }
Пример #3
0
        private void btnNotAccount_Click(object sender, EventArgs e)
        {
            label2.Visible = false;
            label2.Text    = string.Empty;

            DateTime   date = dateTimePicker1.Value;
            InventoryP vo   = new InventoryP(date, FishEntity.Variable.User.username, 1);

            progressBar1.Visible = true;
            progressBar1.Value   = progressBar1.Minimum;

            backgroundWorker1.RunWorkerAsync(vo);
        }