Ejemplo n.º 1
0
 protected override void OrderConfirm()
 {
     try
     {
         this.resolver.Input    = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
         this.resolver.PrintUrl = string.Empty;
         this.resolver          = TheClientMgr.ScanBarcode(this.resolver);
         if (this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty && this.resolver.NeedPrintAsn)
         {
             Utility.PrintOrder(this.resolver.PrintUrl, this, null);
         }
         this.lblMessage.Text = this.resolver.Result;
         InitialAll();
     }
     catch (FaultException ex)
     {
         this.lblMessage.Text = Utility.FormatExMessage(ex.Message);
         MessageBox.Show(this, Utility.FormatExMessage(ex.Message));
         this.tbBarCode.Focus();
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
         InitialAll();
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         IList <Client> clientList = TheClientMgr.GetAllClient();
         this.ddlClientId.DataSource = clientList;
         this.ddlClientId.DataBind();
     }
 }
Ejemplo n.º 3
0
    protected void lbtnDelete_Click(object sender, EventArgs e)
    {
        string code = ((LinkButton)sender).CommandArgument;

        try
        {
            TheClientMgr.DeleteClient(code);
            ShowSuccessMessage("MasterData.Client.DeleteClient.Successfully", code);
            UpdateView();
        }
        catch (Castle.Facilities.NHibernateIntegration.DataException ex)
        {
            ShowErrorMessage("MasterData.Client.DeleteClient.Fail", code);
        }
    }
Ejemplo n.º 4
0
 private void ShowHuStatus()
 {
     try
     {
         this.resolver.Input = this.tbBarCode.Text.Trim();
         if (this.resolver.Input != string.Empty)
         {
             this.resolver = TheClientMgr.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.StorageBinCode + "\n状态:" + t.Status;
                 string caption = "条码信息:";
                 MessageBox.Show(this, text, caption, MessageBoxButtons.OK);
                 this.resolver.Transformers[0].TransformerDetails = null;
                 this.tbBarCode.Text = string.Empty;
                 this.tbBarCode.Focus();
             }
         }
     }
     catch (FaultException ex)
     {
         string messageText = Utility.FormatExMessage(ex.Message);
         this.lblMessage.Text = messageText;
         MessageBox.Show(this, messageText);
         this.InitialAll();
         this.gvHuList.Visible = false;
         this.gvList.Visible   = false;
         this.tbBarCode.Text   = string.Empty;
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error);
         this.InitialAll();
         this.gvHuList.Visible = false;
         this.gvList.Visible   = false;
         this.tbBarCode.Text   = string.Empty;
     }
 }
Ejemplo n.º 5
0
    protected void checkClient(object source, ServerValidateEventArgs args)
    {
        CustomValidator cv = (CustomValidator)source;

        switch (cv.ID)
        {
        case "cvClientId":
            if (TheClientMgr.LoadClient(args.Value) != null)
            {
                ShowErrorMessage("MasterData.Client.CodeExist", args.Value);
                args.IsValid = false;
            }
            break;

        default:
            break;
        }
    }
Ejemplo n.º 6
0
 private void OrderOffline()
 {
     if (!Utility.IsHasTransformer(this.resolver))
     {
         this.lblMessage.Text = "明细不能为空";
         this.tbBarCode.Focus();
         return;
     }
     Utility.RemoveLot(resolver);
     this.resolver.PrintUrl = string.Empty;
     this.resolver.Input    = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK;
     this.resolver          = TheClientMgr.ScanBarcode(this.resolver);
     if (this.resolver.AutoPrintHu && this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty)
     {
         Utility.PrintOrder(this.resolver.PrintUrl, this, null);
     }
     this.lblMessage.Text = this.resolver.Result;
     InitialAll();
 }