public ObjectWithId AddNorm(ServiceNormDTO dto) { ServiceNorm norm = new ServiceNorm(); norm.SaveChanges(dto); return norm; }
protected override DataTransferObject GetDataTransferObject() { ServiceNormDTO mdto = new ServiceNormDTO { ServiceOld = this.ServiceOld, Rate = this.numNorm.Value, Unit = this.selectUnit.SelectedFasetItem, ByUnit = this.selectByUnit.SelectedFasetItem, OrgDocument = this.selectOrgDocument.SelectedOrgDocument, Dateb = this.datePeriod.DateBegin, Datee = this.datePeriod.DateEnd }; if (this.tbxFromValue.get_Text() != string.Empty) { mdto.FromValue = System.Convert.ToDecimal(this.tbxFromValue.get_Text()); } if (this.tbxToValue.get_Text() != string.Empty) { mdto.ToValue = System.Convert.ToDecimal(this.tbxToValue.get_Text()); } return mdto; }