Пример #1
0
 public CashBank VName(CashBank cashBank, ICashBankService _cashBankService)
 {
     if (String.IsNullOrEmpty(cashBank.Name) || cashBank.Name.Trim() == "")
     {
         cashBank.Errors.Add("Name", "Tidak boleh kosong");
     }
     if (_cashBankService.IsNameDuplicated(cashBank))
     {
         cashBank.Errors.Add("Name", "Tidak boleh ada duplikasi");
     }
     return(cashBank);
 }