Beispiel #1
0
 void SAP_Validate()
 {
     try
     {
         int x = txt_sapcode.Text.IndexOf('/');
         if (x > 0)
         {
             txt_sapcode.Text = txt_sapcode.Text.Substring(0, x);
         }
         ObjectModule.Local.Sapcode sap = Logic.Transaction.Sap_Infor(txt_sapcode.Text, StaticRes.Global.Current_User.DEPARTMENT);
         this.txt_description.Text        = sap.DESCRIPTION;
         this.txt_newMaxWeight.Text       = sap.NEW_MAX_WEIGHT.ToString();
         this.txt_newMinWeight.Text       = sap.NEW_MIN_WEIGHT.ToString();
         this.txt_thawingTime.Text        = System.DateTime.Now.ToString();
         this.txt_readyTime.Text          = DateTime.Parse(txt_thawingTime.Text).AddHours(sap.THAWING_TIME).ToString();
         this.txt_expiryTime.Text         = DateTime.Parse(txt_thawingTime.Text).AddHours(sap.USAGE_LIFE).ToString();
         this.txt_capacity.Text           = sap.CAPACITY.ToString();
         this.txt_emptySyringeWeight.Text = sap.EMPTY_SYRINGE_WEIGHT.ToString();
         this.txt_partID.Text             = "P" + System.DateTime.Now.ToString("yyyyMMddHHmmss");
         ObjectModule.Local.Binning bin = Logic.Transaction.Search_Empty_Slot(int.Parse(txt_capacity.Text));
         this.txt_slotID.Text    = bin.SLOT_ID.ToString();
         this.txt_slotIndex.Text = bin.SLOT_INDEX.ToString();
         kb.CurrentTextBox       = txt_batchNo;     //txt_mfExpiryDate;
         time_start          = System.DateTime.Now; //Meaning have action
         Transaction_ongoing = true;
         TextBox_Logic(txt_sapcode, txt_batchNo);
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Beispiel #2
0
        void PartID_Validate()
        {
            try
            {
                if (!StaticRes.Global.Re_scan)
                {
                    ObjectModule.Local.Tracking gt = Logic.Transaction.Return.PartID_Validate(txt_partID.Text);
                    StaticRes.Global.Pt         = txt_partID.Text;
                    this.txt_batchNo.Text       = gt.BATCH_NO;
                    this.txt_description.Text   = gt.DESCRIPTION;
                    this.txt_sapcode.Text       = gt.SAPCODE;
                    this.txt_equipID.Text       = gt.EQUIP_ID;
                    this.txt_batchNo.Text       = gt.BATCH_NO;
                    this.txt_description.Text   = gt.DESCRIPTION;
                    this.txt_startWeight.Text   = gt.START_WEIGHT.ToString();
                    this.txt_thawingTime.Text   = gt.THAWING_DATETIME.ToString();
                    this.txt_readyTime.Text     = gt.READY_DATETIME.ToString();
                    this.txt_expiryTime.Text    = gt.EXPIRY_DATETIME.ToString();
                    this.txt_capacity.Text      = gt.CAPACITY.ToString();
                    this.txt_syringeWeight.Text = gt.EMPTY_SYRINGE_WEIGHT.ToString();
                    ObjectModule.Local.Sapcode gs = Logic.Transaction.Sap_Infor(txt_sapcode.Text, StaticRes.Global.Current_User.DEPARTMENT);
                    this.txt_scrapWeight.Text = gs.SCRAP_WEIGHT.ToString();
                    if (cb_forceScrap.IsChecked == true)
                    {
                        if (cbb_remark.Text.Length == 0)
                        {
                            MessageBox.Show("Please select remark first if you want force scrap !!\n请选择备注,如果你想要报废!!", "Message", MessageBoxButton.OK);
                            return;
                        }
                    }
                    txt_partID.IsEnabled          = false;
                    txt_partID.Background         = System.Windows.Media.Brushes.WhiteSmoke;
                    kb.CurrentTextBox             = null;
                    time_start                    = System.DateTime.Now; //Meaning have action
                    Transaction_ongoing           = true;
                    StaticRes.Global.IsOnProgress = false;               //2014-12-26yakun
                    Weighting.Start_Weight(gs.CAPACITY, false, gs.SCRAP_WEIGHT.ToString(), gt.EXPIRY_DATETIME.ToString(), (bool)cb_forceScrap.IsChecked, txt_syringeWeight.Text);
                }
                else
                {
                    ObjectModule.Local.Tracking gt = Logic.Transaction.Return.PartID_Validate(txt_partID.Text);
                    if (StaticRes.Global.Pt == txt_partID.Text.ToString())
                    {
                        StaticRes.Global.Re_scan = false;//YAKUN.ZHOU 2015.07.13
                        StaticRes.Global.Pt      = string.Empty;
                        TextBox_To_Btn(txt_partID, btn_return);
                    }
                    else
                    {
                        throw new System.Exception("Invalid Part ID !!\n错误的Part ID!!");
                    }
                }
            }

            catch (Exception ee)
            {
                MessageBox.Show(ee.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Beispiel #3
0
        void Sapcode_Validate()
        {
            try
            {
                int x = txt_sapcode.Text.IndexOf('/');
                if (x > 0)
                {
                    txt_sapcode.Text = txt_sapcode.Text.Substring(0, x);
                }
                ObjectModule.Local.Binning gb = Logic.Transaction.Unload.search_Inventory(txt_sapcode.Text, StaticRes.Global.Current_User.DEPARTMENT);
                if (gb.STATUS == StaticRes.Global.Binning_Status.New)
                {
                    this.txt_status.Text = StaticRes.Global.Status.Load;
                }
                else if (gb.STATUS == StaticRes.Global.Binning_Status.Reuse)
                {
                    this.txt_status.Text = StaticRes.Global.Status.Reuse;
                }
                this.txt_expiryTime.Text  = gb.EXPIRY_DATETIME.ToString();
                this.txt_thawingTime.Text = gb.THAWING_DATETIME.ToString();
                this.txt_readyTime.Text   = gb.READY_DATETIME.ToString();
                //this.txt_mesDevice.Text = txt_lotID.Text;
                this.txt_partID.Text = gb.PART_ID;

                _partID = gb.PART_ID;

                this.txt_description.Text   = gb.DESCRIPTION;
                this.txt_batchNo.Text       = gb.BATCH_NO;
                this.txt_currentWeight.Text = gb.CURRENT_WEIGHT.ToString();
                this.txt_startWeight.Text   = gb.START_WEIGHT.ToString();
                this.txt_slotIndex.Text     = gb.SLOT_INDEX.ToString();
                this.txt_slotID.Text        = gb.SLOT_ID.ToString();
                this.txt_capacity.Text      = gb.CAPACITY.ToString();
                ObjectModule.Local.Sapcode sap = Logic.Transaction.Sap_Infor(gb.SAPCODE, StaticRes.Global.Current_User.DEPARTMENT);
                this.txt_syringeWeight.Text = sap.EMPTY_SYRINGE_WEIGHT.ToString();
                time_start = System.DateTime.Now; //Meaning have action
                TextBox_To_Btn(txt_sapcode, btn_unload);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }