Example #1
0
 void returnBg_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (resultBg > 0)
     {
         try
         {
             txtUseCost.Text = bikeReturnTemp.BuCost.ToString() + "元";
             txtUseTime.Text = bikeReturnTemp.BuTimeString;
             MessageBox.Show("还车成功!租车花费:" + bikeReturnTemp.BuCost.ToString() + "元");
             if (vipMoneyTemp.VmBalance < bikeReturnTemp.BuCost)
             {
                 MessageBox.Show("会员卡已透支,请充值!");
                 CheckMiGo miGo = new CheckMiGo();
                 miGo.ShowDialog();
                 if (miGo.isTrue)
                 {
                     ReChargeWindow rechargeWinodw = new ReChargeWindow(true);
                     rechargeWinodw.ShowDialog();
                 }
             }
             btnOK.Enabled = true;
             this.Close();
             //gbCost.Visible = true;
         }
         catch (Exception ex)
         {
         }
     }
     else
     {
         MessageBox.Show("还车失败!");
         btnOK.Enabled = true;
     }
 }
Example #2
0
 private void btnOKClick()
 {
     this.Invoke(new Action(() =>
     {
         int result = 0;
         VipBorrowInfo borrowInfo = new VipBorrowInfo();
         borrowInfo.BbkNumber     = int.Parse(txtNum.Text.Trim());
         borrowInfo.BbkTime       = DateTime.Now;
         borrowInfo.DpId          = StaticData.departLocal.DpId;
         borrowInfo.VipId         = int.Parse(txtVIPNum.Text.Trim());
         borrowInfo.UserId        = StaticData.userLocal.UserId;
         borrowInfo.Mark          = txtMark.Text.Trim();
         if ((int)cmbKind.SelectedValue == 1)
         {
             borrowInfo.RkrId = 1;
             result           = vipBorrowBLL.VipBorrowInsert(borrowInfo, 1);
         }
         else if ((int)cmbKind.SelectedValue == 2)
         {
             borrowInfo.RkrId = 2;
             result           = vipBorrowBLL.VipBorrowInsert(borrowInfo, 2);
         }
         else if ((int)cmbKind.SelectedValue == 3)
         {
             borrowInfo.RkrId = 3;
             result           = vipBorrowBLL.VipBorrowInsert(borrowInfo, 3);
         }
         if (result == -2)
         {
             MessageBox.Show("该用户余额不足以支付起始扣费金额,请充值!");
             CheckMiGo miGo = new CheckMiGo();
             miGo.ShowDialog();
             if (miGo.isTrue)
             {
                 ReChargeWindow rechargeWinodw = new ReChargeWindow(true);
                 rechargeWinodw.ShowDialog();
                 txtBalance.Text = (double.Parse(txtBalance.Text) + rechargeWinodw.chargeMoney).ToString();
             }
         }
         else if (result == -1)
         {
             MessageBox.Show("系统出错,请联系管理员!");
         }
         else if (result == 1)
         {
             MessageBox.Show("租车成功!");
             btnOK.Enabled   = false;
             LogInfo logInfo = new LogInfo();
             logInfo.UserId  = StaticData.userLocal.UserId;
             logInfo.Content = "为会员‘" + txtVipName.Text + "'租车" + txtNum.Text.ToString() + "辆";
             logInfo.LogTime = DateTime.Now;
             logInfo.DpId    = StaticData.departLocal.DpId;
             bool b          = new LogBLL().LogInsert(logInfo);
             this.Close();
         }
     }));
 }
Example #3
0
        private void 会员充值ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                ReChargeWindow rechargeWinodw = new ReChargeWindow(miGo.isAdmin);
                rechargeWinodw.ShowDialog();
            }
        }
Example #4
0
        private void 今日收入查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    TodayIncome today = new TodayIncome(miGo.isAdmin);
                    today.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗不能管理该分店!");
                }
            }
        }
Example #5
0
        private void 积分比例管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.isAdmin)
                {
                    ProporWindow por = new ProporWindow();
                    por.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,您没有此权限!");
                }
            }
        }
Example #6
0
        private void 管理加密狗ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.isAdmin)
                {
                    UManageWindow uManage = new UManageWindow();
                    uManage.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,您没有此权限!");
                }
            }
        }
Example #7
0
        private void 添加加密狗ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.isAdmin)
                {
                    UInfoAdd uAdd = new UInfoAdd();
                    uAdd.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,您没有此权限!");
                }
            }
        }
Example #8
0
        private void 年收入报表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    DepartYearFromWindow departYearForm = new DepartYearFromWindow(miGo.isAdmin);
                    departYearForm.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗不能管理该分店!");
                }
            }
        }
Example #9
0
        private void 会员租车查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    VipOrNoBorrowSelectWindow vipSelect = new VipOrNoBorrowSelectWindow(true);
                    vipSelect.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗不能管理该分店!");
                }
            }
        }
Example #10
0
        private void 日志查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    LogWindow logWindow = new LogWindow(miGo.isAdmin);
                    logWindow.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗不能管理该分店!");
                }
            }
        }
Example #11
0
        private void 管理非会员ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    VipNoManageWindow vipNoManage = new VipNoManageWindow(miGo.isAdmin);
                    vipNoManage.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗不能管理该分店!");
                }
            }
        }
Example #12
0
        private void 管理会员等级ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.isAdmin)
                {
                    VipLevelManageWindow levelManage = new VipLevelManageWindow();
                    levelManage.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗没有此权限!");
                }
            }
        }
Example #13
0
        private void 添加会员等级ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.isAdmin)
                {
                    AddVipLevelWindow addLevel = new AddVipLevelWindow();
                    addLevel.ShowDialog();
                }
                else
                {
                    MessageBox.Show("加密狗验证正确,但该加密狗没有此权限!");
                }
            }
        }
Example #14
0
        private void 包夜管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    NightBorrowRule nightBorrowRule = new NightBorrowRule(miGo.isAdmin);
                    nightBorrowRule.Show();
                }
                else
                {
                    MessageBox.Show("对不起,您没有该权限!");
                }
            }
        }
Example #15
0
        private void 非会员充值ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckMiGo miGo = new CheckMiGo();

            miGo.ShowDialog();
            if (miGo.isTrue)
            {
                if (miGo.DpId == StaticData.departLocal.DpId || miGo.isAdmin)
                {
                    VipNoCharge nocahrge = new VipNoCharge(miGo.isAdmin);
                    nocahrge.ShowDialog();
                }
                else
                {
                    MessageBox.Show("对不起,您没有该权限!");
                }
            }
        }