예제 #1
0
파일: main.cs 프로젝트: phiree/namename
        public void LoginSuccess()
        {
            //更新图片数据
            UpDateImage();
            //加载产品数据
            LoadProInfos();
            //显示正在加载数据的窗口!!!
            proselect.Show();
            proselect.OnProSelectQty += new ProSelect.ProSelectQty(proselect_OnProSelectQty);
            proselect.Hide();
            this.Show();
            this.Text = GlobalValue.GShop.AreaInfo.AreaName + "-" + GlobalValue.GShop.ShopName + "-" + GlobalValue.GUser.TrueName + " 正在使用 么么 门店系统";
            //不可能为null的!
            GlobalValue.GAccount = new DALAccount().GetCurrAccount();

            SellBillInit();
            //创建界面了!!!
            string errorstr;
            Shop_DutyInfo sd = dalduty.OnDuty(GlobalValue.GUser, GlobalValue.GShop, GlobalValue.GAccount, false, out errorstr);

            if (sd != null)
            {
                //正在当班
                dutyinfo = sd;
                btnDutyBegin.Enabled = false;
                btnDutyEnd.Enabled = true;
                //判断是否有单据!有单据则下面的显示,新开一张单据后,数据都保存在内存中!所以不需要判断
            }
            else
            {
                if (string.IsNullOrEmpty(errorstr))
                {
                    //允许当班
                    btnDutyBegin.Enabled = true;
                    btnDutyEnd.Enabled = false;

                    btnAsk.Enabled = true;
                    btnCheck.Enabled = true;
                }
            }
        }
예제 #2
0
파일: main.cs 프로젝트: phiree/namename
        private void btnDutyEnd_Click(object sender, EventArgs e)
        {
            if (selllist != null)
            {
                GlobalFun.MessageBoxError("还有单据未处理,不能交班");
                return;
            }
            dalduty.DutyEnd(dutyinfo);
            dutyinfo = null;
            //允许当班
            btnDutyBegin.Enabled = true;
            btnDutyEnd.Enabled = false;

            btnAsk.Enabled = true;
            btnCheck.Enabled = true;
        }
예제 #3
0
파일: main.cs 프로젝트: phiree/namename
 private void btnDutyBegin_Click(object sender, EventArgs e)
 {
     string errorstr;
     Shop_DutyInfo sd = dalduty.OnDuty(GlobalValue.GUser, GlobalValue.GShop, GlobalValue.GAccount, true, out errorstr);
     if (sd != null)
     {
         dutyinfo = sd;
         //开始当班
         btnDutyBegin.Enabled = false;
         btnDutyEnd.Enabled = true;
         btnNew.Enabled = true;
         btnBack.Enabled = true;
         btnAsk.Enabled = false;
         btnCheck.Enabled = false;
     }
     else
     {
         GlobalFun.MessageBoxError(errorstr);
     }
 }