public Result CheckInputUpdateInterviewMark(UpdateInterviewMark input) { var result = new Result(); result.Code = 0; if (input == null) { result.Code = 1; result.Description = "Thông tin đầu vào không đúng"; return(result); } var infoContact = ContactRepository.GetInfo(input.contactId); if (input.contactId == null || infoContact == null) { result.Code = 1; result.Description = "Contact có Id không tồn tại trong hệ thống"; return(result); } if (input.grammar < 0 || input.rythm < 0 || input.smooth < 0 || input.speaking < 0 || input.vocabulary < 0) { result.Code = 1; result.Description = "Có điểm bị trống"; return(result); } return(result); }
public Result CheckInputUpdateInterviewMark(UpdateInterviewMark input) { var result = new Result { Code = 0 }; if (input == null) { result.Code = 1; result.Description = "Thông tin đầu vào không đúng"; return(result); } if (input.contactId < 0) { result.Code = 1; result.Description = "ContactID bị NULL"; return(result); } if (input.grammar < 0 || input.rythm < 0 || input.smooth < 0 || input.speaking < 0 || input.vocabulary < 0) { result.Code = 1; result.Description = "Có điểm bị trống"; return(result); } return(result); }
public Result CheckInputUpdateInterviewMark(UpdateInterviewMark input) { var result = new Result(); result.Code = 0; if (input == null) { result.Code = 1; result.Description = "Thông tin đầu vào không đúng"; return result; } var infoContact = ContactRepository.GetInfo(input.contactId); if (input.contactId==null || infoContact == null) { result.Code = 1; result.Description = "Contact có Id không tồn tại trong hệ thống"; return result; } if (input.grammar<0 || input.rythm<0 || input.smooth<0 || input.speaking <0 || input.vocabulary<0) { result.Code = 1; result.Description = "Có điểm bị trống"; return result; } return result; }