Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public BOEod CheckCommandStatus(BOEod pBo, IList<string> pProperties)
- {
- pBo.isValid = false;
- if (pProperties != null)
- {
- int Num=-1;
- pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null);
- if (ifIntegerGetValue(pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null).ToString(), out Num))
- {
- if (Num == 1)
- pBo.isValid = true;
- }
- }
- return pBo;
- }
- public T CheckCommandStatus<T>(T pBO, Ilist<string> pProperties){..}
- public interface IIsValid
- {
- bool IsValid{get;set;}
- }
- public class BOEod : IIsValid
- {
- public bool IsValid{get;set;}
- }
- public T CheckCommandStatus<T>(T pBO, IList<string> pProperties)
- where T : IIsValid{..}
- public BOEod CheckCommandStatus<T>(T pBo, IList<string> pProperties) where T : IBOEod
- {
- pBo.isValid = false;
- if (pProperties != null)
- {
- int Num = -1;
- string propValue = pBo.GetType().GetProperty(pProperties[0].ToString()).GetValue(pBo, null).ToString();
- if (ifIntegerGetValue(propValue, out Num))
- {
- if (Num == 1)
- pBo.isValid = true;
- }
- }
- return pBo;
- }
- public interface IBOEod
- {
- bool IsValid { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement