ShowMessageBox() public static method

public static ShowMessageBox ( string message ) : void
message string
return void
Esempio n. 1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         string userCode = this.tbUserCode.Text;
         string password = Utility.Md5(this.tbPassword.Text);
         this.LoginEvent(userCode, password);
     }
     catch (Exception ex)
     {
         this.tbUserCode.Focus();
         Utility.ShowMessageBox("未知错误!请与管理员联系!" + ex.Message);
         InitialLogin();
     }
 }
Esempio n. 2
0
        private void LoadUCLogin()
        {
            try
            {
                if (this.plMain.Controls.Count > 0)
                {
                    this.plMain.Controls.RemoveAt(0);
                }
                this.ucLogin = new UCLogin();
                //
                this.ucLogin.LoginEvent += new LoginHandler(this.ProcessLoginEvent);
                this.ucLogin.ExitEvent  += new ExitHandler(this.ProcessExitEvent);

                this.plMain.Controls.Add(this.ucLogin);
            }
            catch (Exception ex)
            {
                Utility.ShowMessageBox("网络故障!");
                Application.Exit();
            }
        }
Esempio n. 3
0
        private void pbQuestion_Click(object sender, EventArgs e)
        {
            string message = HelpMessage();

            Utility.ShowMessageBox(message);
        }
Esempio n. 4
0
 private void ShowHuStatus()
 {
     try
     {
         this.dgList.Visible = false;
         this.resolver.Input = this.tbBarCode.Text.Trim();
         if (this.resolver.Input != string.Empty)
         {
             this.resolver = TheSmartDeviceMgr.ScanBarcode(this.resolver);
             if (this.resolver.Transformers != null &&
                 this.resolver.Transformers.Length == 1 &&
                 this.resolver.Transformers[0].TransformerDetails != null &&
                 this.resolver.Transformers[0].TransformerDetails.Length == 1)
             {
                 TransformerDetail t = this.resolver.Transformers[0].TransformerDetails[0];
                 //string text = "条码信息:                                                \n条码:"
                 //    + t.HuId + "\n物料代码:" + t.ItemCode
                 //    + "\n物料描述:" + t.ItemDescription + "\n数量:" + t.Qty.ToString("0.########")
                 //    + "\n批号:" + t.LotNo + "\n库位:" + t.LocationCode + "\n状态:" + t.Status;
                 //string caption = "条码信息:";
                 //MessageBox.Show(text, caption);
                 this.lblMessage.Text         = "条码状态信息:";
                 this.lblHuId.Text            = "编号:" + t.HuId;
                 this.lblItemCode.Text        = "物料代码:" + t.ItemCode;
                 this.lblItemDescription.Text = "物料描述:" + t.ItemDescription;
                 this.lblQty.Text             = "数量:" + t.Qty.ToString("0.########");
                 this.lblLotNo.Text           = "批号:" + t.LotNo;
                 this.lblLocationCode.Text    = "库位:" + t.LocationCode;
                 this.lblBinCode.Text         = "库格:" + t.StorageBinCode;
                 this.lblStatus.Text          = "状态:" + t.Status;
                 if (t.Status != BusinessConstants.CODE_MASTER_HU_STATUS_VALUE_INVENTORY)
                 {
                     this.lblMessage.ForeColor         = Color.Red;
                     this.lblHuId.ForeColor            = Color.Red;
                     this.lblItemCode.ForeColor        = Color.Red;
                     this.lblItemDescription.ForeColor = Color.Red;
                     this.lblQty.ForeColor             = Color.Red;
                     this.lblLotNo.ForeColor           = Color.Red;
                     this.lblLocationCode.ForeColor    = Color.Red;
                     this.lblStatus.ForeColor          = Color.Red;
                 }
                 else
                 {
                     this.lblMessage.ForeColor         = Color.Black;
                     this.lblHuId.ForeColor            = Color.Black;
                     this.lblItemCode.ForeColor        = Color.Black;
                     this.lblItemDescription.ForeColor = Color.Black;
                     this.lblQty.ForeColor             = Color.Black;
                     this.lblLotNo.ForeColor           = Color.Black;
                     this.lblLocationCode.ForeColor    = Color.Black;
                     this.lblStatus.ForeColor          = Color.Black;
                 }
                 this.resolver.Transformers[0].TransformerDetails = null;
                 this.tbBarCode.Text = string.Empty;
                 this.tbBarCode.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         this.lblMessage.Text    = Utility.FormatExMessage(ex.Message);
         this.lblMessage.Visible = true;
         Utility.ShowMessageBox(ex.Message);
         this.resolver.Transformers = null;
         this.tbBarCode.Focus();
         this.tbBarCode.Text = string.Empty;
     }
 }