Example #1
0
        /// <summary>
        /// 更新派车单
        /// </summary>
        private void UpdateSendCarBill()
        {
            SendCarBill bill = null;

            if (mSendCarBill == null)
            {
                if (mWeighingBill.sendCarBillId != null)
                {
                    bill = SendCardBillModel.GetById(mWeighingBill.sendCarBillId);
                }
            }
            else
            {
                bill = mSendCarBill;
            }
            if (bill == null)
            {
                return;
            }
            CommonFunction.WeighingMargeToSendCarrBill(mWeighingBill, ref bill);
            if (isInsert)
            {
                bill.weightStatus = (int)SendCarWeighingStatus.In;
            }
            else
            {
                bill.weightStatus = (int)SendCarWeighingStatus.Out;
            }
            DatabaseOPtionHelper.GetInstance().update(bill);
        }
 /// <summary>
 /// 将当前的磅单的信息同步到派车单
 /// </summary>
 /// <param name="weighingBill">磅单</param>
 /// <param name="sendCarBill">派车单</param>
 public static void WeighingMargeToSendCarrBill(WeighingBill weighingBill, ref SendCarBill sendCarBill)
 {
     sendCarBill.inFactoryTime  = weighingBill.sendInTime;
     sendCarBill.outFactoryTime = weighingBill.sendOutTime;
     sendCarBill.weighingNumber = weighingBill.sendNumber;
     sendCarBill.weighingBillId = weighingBill.id;
     sendCarBill.syncTime       = MyHelper.DateTimeHelper.GetTimeStamp();
 }
Example #3
0
 private void Select(DataGrid dg)
 {
     mSendCarBill = (SendCarBill)dg.SelectedItem;
     this.Close();
     if (this.SelectAction != null)
     {
         this.SelectAction(mSendCarBill);
     }
 }
Example #4
0
 private void InFactoryRB_Checked(object sender, RoutedEventArgs e)
 {
     if (this.IsLoaded)
     {
         mSendCarBill     = null;
         mWeighingBill    = null;
         isInsert         = true;
         IsHasSendCarBill = false;
         isOutFactory     = false;
         BuildCurrWeighingBill();
     }
 }
Example #5
0
 private void SelectSendCar(SendCarBill bill)
 {
     if (bill == null)
     {
         this.InFactoryRB.IsChecked = true;
     }
     else
     {
         mSendCarBill = bill;
         BuildCurrWeighingBill();
     }
 }
 private void SendBollListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.SendBillListView.SelectedIndex < 0)
     {
         return;
     }
     IsSendCarBill = true;
     mWeighingBill = null;
     mSendCarBilll = this.SendBillListView.SelectedItem as SendCarBill;
     this.SendBillGrid.DataContext = mSendCarBilll;
     ShowCurrentPanel();
 }
Example #7
0
 private void OutFactoryRb_Checked(object sender, RoutedEventArgs e)
 {
     if (IsLoaded)
     {
         isOutFactory     = true;
         IsHasSendCarBill = false;
         isInsert         = false;
         //如果点击了车辆出场,就要将传过来的派车单置空
         mSendCarBill = null;
         new CarOutFactoryW(WeightingBillType.CK)
         {
             SelectAction = new Action <WeighingBill>(this.SelectCarOutFactory)
         }.ShowDialog();
     }
 }
Example #8
0
 public OutputWindow(object bill = null, bool isSend = false)
 {
     InitializeComponent();
     if (isSend == true)
     {
         mSendCarBill     = (SendCarBill)bill;
         IsHasSendCarBill = true;
     }
     else
     {
         mWeighingBill = (WeighingBill)bill;
         if (mWeighingBill != null)
         {
             isInsert     = false;
             isOutFactory = true;
             this.OutFactoryRb.IsChecked = true;
         }
     }
 }
 /// <summary>
 /// 将派车单的信息同步到当前的磅单
 /// </summary>
 /// <param name="send">派车单</param>
 /// <param name="weighingBill">磅单</param>
 public static void SendCardMargeToWeighing(SendCarBill send, ref WeighingBill weighingBill)
 {
     weighingBill.sendCarBillId      = send.id;
     weighingBill.sendCarBillNumber  = send.number;
     weighingBill.sendCarUser        = send.userName;
     weighingBill.sendCompanyId      = send.sendCompanyId;
     weighingBill.sendCompanyName    = send.sendCompanyName;
     weighingBill.sendYardId         = send.sendYardId;
     weighingBill.sendYardName       = send.sendYardName;
     weighingBill.receiveCompanyId   = send.receiveCompanyId;
     weighingBill.receiveCompanyName = send.receiveCompanyName;
     weighingBill.receiveYardId      = send.receiveYardId;
     weighingBill.receiveYardName    = send.receiveYardName;
     weighingBill.sendMaterialId     = send.materialId;
     weighingBill.sendMaterialName   = send.materialName;
     weighingBill.carId         = send.carId;
     weighingBill.plateNumber   = send.plateNumber;
     weighingBill.driver        = send.driver;
     weighingBill.driverMobile  = send.driverMobile;
     weighingBill.receiveRemark = weighingBill.receiveRemark + " " + send.remark;
 }