コード例 #1
0
ファイル: FormFormalUser.cs プロジェクト: lruibing123/PLMS
        private void AddFormalUser_Load(object sender, EventArgs e)
        {
            form = (FormManage)Owner;
            FormalUser formalUser = (FormalUser)AdminBLL.GetFormalUserById(userId);

            switch (permissions)
            {
            case Permissions.Add:
                Text = "正式车办理";
                break;

            case Permissions.Edit:
                textBox1.Text = formalUser.LicensePlateNum;
                textBox2.Text = formalUser.Phone;
                buttonOK.Hide();
                Text = "修改信息";
                radioButton1.Enabled = radioButton2.Enabled = false;
                break;

            case Permissions.Delay:
                textBox1.Text = formalUser.LicensePlateNum;
                textBox2.Text = formalUser.Phone;
                buttonOK.Hide();
                Text             = "正式车续期";
                textBox1.Enabled = textBox2.Enabled = false;
                break;

            case Permissions.Up:
                Text = "临时车升级";
                CasualUser casualUser = (CasualUser)AdminBLL.GetCasualUsersById(userId);
                textBox1.Text    = casualUser.LicensePlateNum;
                textBox1.Enabled = false;
                break;
            }
        }
コード例 #2
0
ファイル: FormSimulate.cs プロジェクト: lruibing123/PLMS
 private void LeaveScan()
 {
     while (isLeave)
     {
         Thread.Sleep(1000);
         bitmap = videoSourcePlayer1.GetCurrentVideoFrame();
         string licemsePlateNum = LicensePlateOCR.Get(bitmap);
         if (licemsePlateNum != null)
         {
             string result;
             label1.Text = VehicleBLL.VehicleLeave(licemsePlateNum, out result) ? "欢迎离开" : "";
             label2.Text = result;
             label3.Text = AdminBLL.GetActiveParkNum() + " / " + AdminBLL.GetParkingSpotNum();
             BaseBLL.SaveALL();
             FormManage form = (FormManage)Owner;
             form.Refresh();
             Thread.Sleep(8000);
         }
         else
         {
             label1.Text = "检测失败";
             label2.Text = "";
         }
     }
     label1.Text = label2.Text = "";
 }
コード例 #3
0
ファイル: FormLogin.cs プロジェクト: lruibing123/PLMS
        private void buttonSignin_Click(object sender, EventArgs e)
        {
            label3.Text = textBox1.Text == "" ? "请输入Id" : textBox2.Text == "" ? "请输入密码" : "";
            if (label3.Text != "")
            {
                return;
            }
            string errorMsg;

            if (LoginBLL.Login(textBox1.Text, textBox2.Text, !radioButton1.Checked, out errorMsg))
            {
                textBox2.Text = "";
                FormManage form = new FormManage(radioButton2.Checked);
                form.Show(this);
                Hide();
            }
            label3.Text = errorMsg;
        }
コード例 #4
0
ファイル: FormAdmin.cs プロジェクト: lruibing123/PLMS
        private void AddAdmin_Load(object sender, EventArgs e)
        {
            form = (FormManage)Owner;
            switch (permissions)
            {
            case Permissions.Add:
                Text = "增加管理员";
                break;

            case Permissions.Edit:
                Text             = "修改管理员密码";
                textBox1.Enabled = false;
                buttonOK.Hide();
                Admin admin = AdminBLL.GetAdminById(adminId);
                textBox1.Text = admin.Id;
                textBox2.Text = admin.Password;
                break;
            }
        }