public SerialNumber(SerialNumber that)
 {
     SerialNumberStart_L = that.SerialNumberStart_L;
     SerialNumberStart_R = that.SerialNumberStart_R;
     SerialNumber_L = that.SerialNumber_L;
     SerialNumber_R = that.SerialNumber_R;
 }
 private void WriteTextBox(Model model, SerialNumber serial)
 {
     NModel.Text = model.ModelName;
     NCustomer.Text = model.Customer;
     NProdectInfo.Text = model.ProductInfo;
     NProductNum.Text = model.PartNumber;
     NLabelID.Text = model.LabelID;
     NLHSerialNum.Text = serial.SerialNumberStart_L.ToString();
     NRHSerialNum.Text = serial.SerialNumberStart_R.ToString();
 }
        private void WriteModel(Model model, SerialNumber serial)
        {
            model.ModelName = NModel.Text;
            model.Customer = NCustomer.Text;
            model.ProductInfo = NProdectInfo.Text;
            model.PartNumber = NProductNum.Text;
            model.LabelID = NLabelID.Text;

            int temp;
            if (Int32.TryParse(NLHSerialNum.Text, out temp))
                serial.SerialNumberStart_L = temp;
            if (Int32.TryParse(NRHSerialNum.Text, out temp))
                serial.SerialNumberStart_R = temp;
        }
示例#4
0
 public static string AssembleSerialNumber(ModelItem item, SerialNumber serialnumber)
 {
     var nt = item.Time;
     var dbt = SetupDirector.GetInstance().Package.TimeInfo.Day.BeginTime;
     var det = SetupDirector.GetInstance().Package.TimeInfo.Day.EndTime;
     var nbt = SetupDirector.GetInstance().Package.TimeInfo.Night.BeginTime;
     var net = SetupDirector.GetInstance().Package.TimeInfo.Night.EndTime;
     string ABN = "N";
     if (dbt <= nt && nt <= det) //주간 
         ABN = "A";
     else if (nbt <= nt || nt <= net) //야간
         ABN = "B";
     int serialn = item.LR == ModelItem.DIRECTION.L ? serialnumber.SerialNumber_L++ : serialnumber.SerialNumber_R++;
     string serials = serialn > 999 ? string.Format("{0}", serialn) : string.Format("{0:D4}", serialn);
     string serial_number = item.Date.ToString("yyMMdd") + ABN + serials;
     return serial_number;
 }
 private void NModelNum_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     string selectedItem = e.AddedItems[0] as string;
     Model model = null;
     SerialNumber serialN = null;
     switch (selectedItem)
     {
         case ModelSettingWindow.MODEL_ITEM_1:
             model = ModelDirector.GetInstance().Item[0];
             serialN = SerialNumberDirector.GetInstance().Item[0];
             break;
         case ModelSettingWindow.MODEL_ITEM_2:
             model = ModelDirector.GetInstance().Item[1];
             serialN = SerialNumberDirector.GetInstance().Item[1];
             break;
         case ModelSettingWindow.MODEL_ITEM_3:
             model = ModelDirector.GetInstance().Item[2];
             serialN = SerialNumberDirector.GetInstance().Item[2];
             break;
     }
     SetModelItemInfo(model);
     SelectedModel = model;
     SelectedSerialNumber = serialN;
 }