Ejemplo n.º 1
0
 public bool IsValidStaus(string strStatusIndex, out byte result)
 {
     if (byte.TryParse(strStatusIndex, out result))
     {
         if (result >= 0 && result < STATUS_LIST_DATA.Length)
         {
             return(true);
         }
     }
     WarningMessageProp?.Invoke(this, Messages.StatusFilmIsNotCorrect, null);
     return(false);
 }
Ejemplo n.º 2
0
 public bool IsValidName(string nameFilm)
 {
     if (string.IsNullOrWhiteSpace(nameFilm))
     {
         WarningMessageProp?.Invoke(this, Messages.NameFilmIsNull, nameof(nameFilm));
         return(false);
     }
     if (nameFilm.Length > Convert.ToInt32(Constants.MaxSetLengthNameFilm))
     {
         WarningMessageProp?.Invoke(this, Messages.NameFilmIsLong, nameof(nameFilm));
         return(false);
     }
     return(true);
 }
Ejemplo n.º 3
0
 public bool IsValidRate(string strRate, out bool?resultIsIndexInList)
 {
     resultIsIndexInList = null;
     if (RATE_LIST_DATA.SingleOrDefault(item => item == strRate) != default)
     {
         resultIsIndexInList = false;
         return(true);
     }
     if (byte.TryParse(strRate, out byte result))
     {
         if (result >= 0 && result < RATE_LIST_DATA.Length)
         {
             resultIsIndexInList = true;
             return(true);
         }
     }
     WarningMessageProp?.Invoke(this, Messages.RateFilmIsNotCorrect, nameof(strRate));
     return(false);
 }