Ejemplo n.º 1
0
        public override void Login()
        {
            if (string.IsNullOrEmpty(User) || string.IsNullOrEmpty(Password))
            {
                MetroMessageBox.Show(this, "工号密码不能为空", "提示",
                                     MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (string.IsNullOrEmpty(cboLouceng.Text.Trim()))
            {
                MetroMessageBox.Show(this, "楼层不能为空", "提示",
                                     MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (SAPDataService.Login(User, Password))
            {
                //缓存当前登录用户
                SysConfig.CurrentLoginUser = new HLACommonLib.Model.UserInfo()
                {
                    UserId = User, Password = Password
                };
                SysConfig.DeviceInfo.LOUCENG = cboLouceng.Text;
                InventoryForm form = new InventoryForm();
                form.ShowDialog();
            }
            else
            {
                MetroMessageBox.Show(this, "用户名或密码错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            base.Login();
        }
Ejemplo n.º 2
0
 public DebugForm(InventoryForm i)
 {
     mParentForm = i;
     InitializeComponent();
 }