예제 #1
0
 public Models.PaymentTerm Create(Parameters.CreateParameter param)
 {
     param.Validate();
     assertPaymentTermNotExist(param.Value, param.OrganizationId);
     Models.PaymentTerm term = param.ParseToPaymentTerm();
     repository.Insert(term);
     return(term);
 }
예제 #2
0
 public void Update(Parameters.UpdateParameter param)
 {
     param.Validate();
     Models.PaymentTerm term = repository.Get(param.Id);
     if (term.Value != param.Value)
     {
         assertPaymentTermNotExist(param.Value, term.OrganizationId);
         term.Value = param.Value;
         term.Name  = string.Format("{0} Hari", term.Value);
     }
     repository.Update(term);
 }