示例#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);
     }
 }
示例#2
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);
            }
        }
示例#3
0
 void Weight_Validate(string Weight)
 {
     try
     {
         txt_weighing.Text = Weight;
         if (cb_forceScrap.IsChecked != true)
         {
             // StaticRes.Global.updata = true; //YAKUN.ZHOU 2015.07.13
             this.cbb_returnType.Text = Logic.Transaction.Return.Weight_Validation(Weight, txt_scrapWeight.Text, txt_expiryTime.Text, txt_syringeWeight.Text);
         }
         else
         {
             // StaticRes.Global.updata = true; //YAKUN.ZHOU 2015.07.13
             this.cbb_returnType.Text = StaticRes.Global.Status.Scrap;
         }
         if (this.cbb_returnType.Text == StaticRes.Global.Status.Reuse)
         {
             ObjectModule.Local.Binning fb = Logic.Transaction.Search_Empty_Slot(int.Parse(txt_capacity.Text));
             this.txt_slotID.Text      = fb.SLOT_ID.ToString();
             this.txt_slotIndex.Text   = fb.SLOT_INDEX.ToString();
             StaticRes.Global.Re_scan  = true;
             this.txt_partID.Text      = string.Empty;
             this.txt_partID.IsEnabled = true;;
             TextBox_Logic(txt_weighing, txt_partID);
             MessageBox.Show("请再扫描partID确认存储", "Message", MessageBoxButton.OK);
         }
         else
         {
             // StaticRes.Global.updata = true;//YAKUN.ZHOU 2015.07.13
             this.txt_slotID.Text    = "0";
             this.txt_slotIndex.Text = "0";
             TextBox_To_Btn(txt_weighing, btn_return);
             Return_Process();
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
示例#4
0
 void Batch_Validate()
 {
     try
     {
         string a = "RW";
         if (a != txt_batchNo.Text.Substring(0, 2))
         {
             MessageBox.Show("Enter the batch number error !!\n输入Batch号码错误", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
             return;
         }
         ObjectModule.Local.Binning bin = Logic.Transaction.Load.BatchNo_Validate(txt_sapcode.Text, txt_batchNo.Text, ref Record_Count);
         if (Record_Count >= 2)
         {
             txt_mfExpiryDate.Text       = bin.MF_EXPIRY_DATE.ToString();
             kb.CurrentTextBox           = null;
             this.txt_batchNo.Background = System.Windows.Media.Brushes.White;
             this.txt_batchNo.IsEnabled  = false;
             time_start                            = System.DateTime.Now; //Meaning have action
             Transaction_ongoing                   = true;
             StaticRes.Global.IsOnProgress         = false;
             StaticRes.Global.Transaction_Continue = true;
             Weighting.Start_Weight(int.Parse(txt_capacity.Text), true, string.Empty, string.Empty, false, string.Empty);
         }
         else
         {
             if (Record_Count == 1)
             {
                 MFG_Expiry_Date = bin.MF_EXPIRY_DATE.ToString();
             }
             kb.CurrentTextBox = txt_mfExpiryDate;
             TextBox_Logic(txt_batchNo, txt_mfExpiryDate);
         }
     }
     catch
     {
     }
 }