Esempio n. 1
0
 public static string GetDescription(this ValidationResponses val)
 {
     DescriptionAttribute[] attributes = (DescriptionAttribute[])val
                                         .GetType()
                                         .GetField(val.ToString())
                                         .GetCustomAttributes(typeof(DescriptionAttribute), false);
     return(attributes.Length > 0 ? attributes[0].Description : string.Empty);
 }
Esempio n. 2
0
 public virtual void Reset(CommandType type)
 {
     if (CommandObject != null)
     {
         CommandObject.CommandText = string.Empty;
         CommandObject.CommandType = type;
         CommandObject.Parameters.Clear();
     }
     LastException     = null;
     SQL               = string.Empty;
     RowsAffected      = 0;
     IdentityGenerated = null;
     ValidationResponses.Clear();
 }