示例#1
0
 public OtherExpense VHasUniqueCode(OtherExpense otherExpense, IOtherExpenseService _otherExpenseService)
 {
     if (String.IsNullOrEmpty(otherExpense.Code) || otherExpense.Code.Trim() == "")
     {
         otherExpense.Errors.Add("Code", "Tidak boleh kosong");
     }
     else if (_otherExpenseService.IsCodeDuplicated(otherExpense))
     {
         otherExpense.Errors.Add("Code", "Tidak boleh ada duplikasi");
     }
     return(otherExpense);
 }