Exemplo n.º 1
0
        protected void SaveOrderInfo(bool update = false)
        {
            DeviceOrderInfo info = new DeviceOrderInfo();

            info.OrderDate  = orderDate;
            info.CreateTime = DateTimeNow;
            if (deviceOrderData.orderDetailList.Count > 0)
            {
                info.ProjectNumber = deviceOrderData.orderDetailList.First().ProjectNumber;
            }
            var user = this.AccountService.GetUser(this.LoginInfo.LoginName);

            if (user != null)
            {
                info.OrderPerson = user.Name;
            }
            info.OrderState = (int)EnumOrderStateInfo.AddState;
            if (update)
            {
                DeviceRequest request = new DeviceRequest();
                request.ProjectNumber = info.ProjectNumber;
                if (this.IDKLManagerService.GetDeviceOrderInfoList(request).Count() > 0)
                {
                    this.IDKLManagerService.DeleteDeviceOrderInfo(info.ProjectNumber);
                }
            }
            this.IDKLManagerService.AddDeviceOrderInfo(info);
        }
Exemplo n.º 2
0
 public DeviceOrderingViewModel()
 {
     Device          = new List <DeviceModel>();
     orderInfo       = new DeviceOrderInfo();
     orderDetail     = new DeviceOrderDetail();
     orderDetailList = new List <DeviceOrderDetail>();
 }
 public ProjectWholeInfoViewModel()
 {
     projectTime         = new ProjectInfo();
     projectClosingDate  = new ProjectInfo();
     projectBasicImgFile = new ProjectFile();
     device                        = new DeviceOrderInfo();
     projectBasicinfo              = new ProjectInfo();
     projectConsultBasicinfo       = new ConsultBasicInfo();
     projectBasicFile              = new ProjectFile();
     projectTestBasicinfo          = new TestBasicInfo();
     projectTestChemicalReport     = new TestChemicalReport();
     projectTestChemicalReportList = new List <TestChemicalReport>();
     projectValueBasicinfo         = new ValueBasicInfo();
     sampleTable                   = new SampleRegisterTable();
     projectTestBasicinfoList      = new List <TestBasicInfo>();
     arguments                     = new ArgumentValue();
 }