| | |
| | | selectSenderCtrl.SetBindingData(0); |
| | | tabbedControlGroup1.SelectedTabPageIndex = 0; |
| | | |
| | | this.selPumpSeriesCtrl.SetBindingData( 0); |
| | | this.selPumpSeriesCtrl.SetBindingData(0); |
| | | //if (ProductID > 0) |
| | | //{ |
| | | // this.selectProductCtrl.SetBindingData4Series(SeriesID, ProductID); |
| | |
| | | XtraMessageBox.Show("è¯·éæ©æµè¯å°ï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (SelProductPump == null) |
| | | if (checkEditä»»æäº§å.Checked) |
| | | { |
| | | XtraMessageBox.Show("è¯·éæ©æµè¯åå·ï¼"); |
| | | return; |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (SelProductPump == null) |
| | | { |
| | | XtraMessageBox.Show("è¯·éæ©æµè¯åå·ï¼"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (imageComboTestStandard.SelectedIndex < 0) |
| | | { |
| | |
| | | ProductType = TProduct.Model.eProductType.Pump, |
| | | CreateTime = DateTime.Now, |
| | | CreateUserID = user_id, |
| | | SeriesID = this.SelProductSeries.ID, |
| | | ProductID = this.SelProductPump.ID, |
| | | PartID = this._selPart.ID, |
| | | IsFixed = false, |
| | | UseStatus = TProduct.Model.eUseStatus.Enable, |
| | | Name = textEditName.Text, |
| | | Code = textEditTestCode.Text, |
| | | JudgeResult = TProduct.Model.eTestJudgeResult.æªå¤æ |
| | | }; |
| | | |
| | | if (!checkEditä»»æäº§å.Checked) |
| | | { |
| | | testProjectBase.SeriesID = this.SelProductSeries == null ? 0 : this.SelProductSeries.ID; |
| | | testProjectBase.ProductID = this.SelProductPump == null ? 0 : this.SelProductPump.ID; |
| | | testProjectBase.PartID = this._selPart == null ? 0 : this._selPart.ID; |
| | | } |
| | | |
| | | testProjectBase.ProjectParas = new TProduct.Model.TestProjectParas() |
| | | { |
| | | JzWenDu = Convert.ToDouble(spinEditä»è´¨æ¸©åº¦.Value), |
| | |
| | | |
| | | |
| | | |
| | | if (_isAddPart) |
| | | if (_isAddPart && SelProductPump != null) |
| | | { |
| | | _selPart = new TProduct.Model.PartBase(); |
| | | if (string.IsNullOrEmpty(this.TextEditPartCode.Text)) |
| | |
| | | else |
| | | { |
| | | //妿æä¸ä¸ªå±æ§æ¹ååä¿®æ¹ |
| | | if (!String.Equals(this.TextEditPartName.Text, _selPart.Name) || |
| | | !String.Equals(this.TextEditPartCode.Text, _selPart.Code) || |
| | | !String.Equals(this.MemoEditNote.Text, _selPart.Note) || |
| | | !String.Equals(manufactureTime, _selPart.ManufactureTime) || |
| | | !String.Equals(sendTime, _selPart.SendTime) || |
| | | selManufacture.ID != _selPart.ManufacturerID || |
| | | selSender.ID != _selPart.SenderID) |
| | | if(_selPart != null) |
| | | { |
| | | _selPart.Code = this.TextEditPartCode.Text.Trim(); |
| | | _selPart.Name = this.TextEditPartName.Text.Trim(); |
| | | _selPart.ManufacturerID = selManufacture.ID; |
| | | _selPart.SenderID = selSender.ID; |
| | | _selPart.Note = this.MemoEditNote.Text.Trim(); |
| | | _selPart.ManufactureTime = manufactureTime; |
| | | _selPart.SendTime = sendTime; |
| | | var bll = new BLL.PartBase(); |
| | | return bll.Update(_selPart); |
| | | if (!String.Equals(this.TextEditPartName.Text, _selPart.Name) || |
| | | !String.Equals(this.TextEditPartCode.Text, _selPart.Code) || |
| | | !String.Equals(this.MemoEditNote.Text, _selPart.Note) || |
| | | !String.Equals(manufactureTime, _selPart.ManufactureTime) || |
| | | !String.Equals(sendTime, _selPart.SendTime) || |
| | | selManufacture.ID != _selPart.ManufacturerID || |
| | | selSender.ID != _selPart.SenderID) |
| | | { |
| | | _selPart.Code = this.TextEditPartCode.Text.Trim(); |
| | | _selPart.Name = this.TextEditPartName.Text.Trim(); |
| | | _selPart.ManufacturerID = selManufacture.ID; |
| | | _selPart.SenderID = selSender.ID; |
| | | _selPart.Note = this.MemoEditNote.Text.Trim(); |
| | | _selPart.ManufactureTime = manufactureTime; |
| | | _selPart.SendTime = sendTime; |
| | | var bll = new BLL.PartBase(); |
| | | return bll.Update(_selPart); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return true; |
| | |
| | | } |
| | | } |
| | | |
| | | private void checkEditä»»æäº§å_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | if (checkEditä»»æäº§å.Checked) |
| | | { |
| | | selPumpSeriesCtrl.Enabled = false; |
| | | selectProductCtrl.Enabled = false; |
| | | imageComboPart.Enabled = false; |
| | | } |
| | | else |
| | | { |
| | | selPumpSeriesCtrl.Enabled = true; |
| | | selectProductCtrl.Enabled = true; |
| | | imageComboPart.Enabled = true; |
| | | } |
| | | } |
| | | } |
| | | } |