コード例 #1
0
        //根据订单对象推算延期信息 并更新界面lable
        private void TipOrderInfo(OrderGatherSearchDto order)
        {
            //给的生产天数
            var days = Convert.ToInt32(order.DaysOfProduction);

            //今天日期
            var now = Convert.ToDateTime(DateTime.Now.ToString("d"));

            //入库到期日期
            var dayStorage = Convert.ToDateTime(order.PlanStorageDate.ToString("d"));

            //入库限期--界面
            this.lbDateStorage.Text = dayStorage.ToString("d");


            //终测限期--界面
            this.lbDateLastTest.Text = dayStorage.AddDays(-1).ToString("d");

            //初测限期--界面
            this.lbDateFistTest.Text = dayStorage.AddDays(-2).ToString("d");

            //组装限期--界面
            this.lbDateAssembly.Text = dayStorage.AddDays(-4).ToString("d");

            //领料限期--界面
            this.lbDateCollection.Text = dayStorage.AddDays(-5).ToString("d");

            //订单剩余日期--界面
            this.lbDateleft.Text = (dayStorage - now).Days.ToString();
        }
コード例 #2
0
        private bool FilterUpdateTestCountSearch(OrderGatherSearchDto searchDto)
        {
            if (searchDto.OnLineQuantity != searchDto.FisrtTestCount || searchDto.LastTestCount != searchDto.OnLineQuantity)
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
        public bool UpdateTestCount(OrderGatherSearchDto orderGatherSearchDto)
        {
            int firstTestCount = _opwayDataRepository.GetFirstTestCount(orderGatherSearchDto.SnMin, orderGatherSearchDto.SnMax);

            int lastTestCount = _opwayDataRepository.GetLastTestCount(orderGatherSearchDto.SnMin, orderGatherSearchDto.SnMax);

            var order = _orderRepository.GetOrderByOrderId(orderGatherSearchDto.OrderId);


            if (order.FisrtTestCount != firstTestCount || order.LastTestCount != lastTestCount)
            {
                order.FisrtTestCount = firstTestCount;
                order.LastTestCount  = lastTestCount;

                _orderRepository.Update(order);
            }

            return(_unitOfWork2.SaveChanges());
        }
コード例 #4
0
        private OrderGatherSearchDto CheckAndGetOrder()
        {
            var count = this.dgvOrderList.SelectedRows.Count;

            var orderGatherSearchDto = new OrderGatherSearchDto();

            if (count == 0)
            {
                MessageBox.Show("请选中一个订单");
            }

            var dgvOrderListCurrentRow = this.dgvOrderList.CurrentRow;

            if (dgvOrderListCurrentRow != null)
            {
                orderGatherSearchDto = ((OrderGatherSearchDto)dgvOrderListCurrentRow.DataBoundItem);
            }
            return(orderGatherSearchDto);
        }
コード例 #5
0
 public int GetLastTestCount(OrderGatherSearchDto orderGatherSearchDto)
 {
     return(_opwayDataRepository.GetLastTestCount(orderGatherSearchDto.SnMin, orderGatherSearchDto.SnMax));
 }