Exemplo n.º 1
0
        private void btnBegin_Click(object sender, EventArgs e)
        {
            try
            {
                _service.BeginWork(ContextService.CurrentAccount, ContextService.StoreId, ContextService.PosId);
                //收银前台
                frmPos posForm = frmPos.CreateForm();
                posForm.Show();

                var mainForm = frmMain.CreateForm();
                mainForm.Hide();

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            //收银台
            // 检查当前班次收银员账户是否一致
            var worker = _workService.GetWorking(ContextService.StoreId, _setting.PosId);

            if (worker == null)
            {
                ShowWorkForm();
                MessageBox.Show("请先上班再开始销售", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (worker.CreatedBy != ContextService.CurrentAccount.Id)
            {
                ShowWorkForm();
                MessageBox.Show("请先交接班再开始销售", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            frmPos posForm = frmPos.CreateForm();

            posForm.Show();
            this.Hide();
        }
Exemplo n.º 3
0
        public void ShowPosForm()
        {
            frmPos posForm = frmPos.CreateForm();

            posForm.Show();
        }