SHARE
TWEET

Untitled

a guest Jun 20th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public BOEod CheckCommandStatus(BOEod pBo, IList<string> pProperties)
  2. {
  3.     pBo.isValid = false;
  4.     if (pProperties != null)
  5.     {
  6.         int Num=-1;
  7.         pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null);
  8.         if (ifIntegerGetValue(pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null).ToString(), out Num))
  9.         {
  10.             if (Num == 1)
  11.                 pBo.isValid = true;
  12.         }
  13.  
  14.     }
  15.     return pBo;
  16. }
  17.      
  18. public T CheckCommandStatus<T>(T pBO, Ilist<string> pProperties){..}
  19.      
  20. public interface IIsValid
  21.   {
  22.       bool IsValid{get;set;}
  23.   }
  24.      
  25. public class BOEod : IIsValid
  26.   {
  27.       public bool IsValid{get;set;}
  28.   }
  29.      
  30. public T CheckCommandStatus<T>(T pBO, IList<string> pProperties)
  31. where T : IIsValid{..}
  32.      
  33. public BOEod CheckCommandStatus<T>(T pBo, IList<string> pProperties) where T : IBOEod
  34. {
  35.     pBo.isValid = false;
  36.     if (pProperties != null)
  37.     {
  38.         int Num = -1;
  39.         string propValue = pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null).ToString();
  40.         if (ifIntegerGetValue(propValue, out Num))
  41.         {
  42.             if (Num == 1)
  43.                 pBo.isValid = true;
  44.         }
  45.     }
  46.     return pBo;
  47. }
  48.  
  49. public interface IBOEod
  50. {
  51.     bool IsValid { get; set; }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top