Exemplo 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;

                InventoryFormNew form = new InventoryFormNew();
                form.ShowDialog();
            }
            else
            {
                MetroMessageBox.Show(this, "用户名或密码错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            base.Login();
        }
Exemplo n.º 2
0
 public UploadMsgForm(InventoryFormNew p)
 {
     mParent = p;
     InitializeComponent();
 }