Esempio n. 1
0
 public ObjectWithId AddNorm(ServiceNormDTO dto)
 {
     ServiceNorm norm = new ServiceNorm();
     norm.SaveChanges(dto);
     return norm;
 }
Esempio n. 2
0
 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;
 }