using System; using System.Data; namespace Net.Connection.Attributes { public class DBParameter : Attribute { public string name { get; set; } public int size { get; set; } public SqlDbType dbType { get; set; } public ParameterDirection direction { get; set; } public ActionType actionType; public Boolean Key { get; set; } /// /// Asignacion del Tipo de Dato /// /// Tipo de dato /// Accion a realizar Everything, View, Insert, Update, Delete /// Primary Key public DBParameter(SqlDbType dbType, ActionType actionType, Boolean Key) { DBParameterMethod(dbType, 0, ParameterDirection.Input, "", actionType, Key); } /// /// Asignacion del Tipo de Dato /// /// Tipo de Dato /// Tamano /// Accion a realizar Everything, View, Insert, Update, Delete public DBParameter(SqlDbType dbType, int size, ActionType actionType) { DBParameterMethod(dbType, size, ParameterDirection.Input, "", actionType, false); } private void DBParameterMethod(SqlDbType dbType, int size, ParameterDirection direction, string name, ActionType actionType, Boolean Key) { this.dbType = dbType; this.direction = direction; this.size = size; this.name = name; this.actionType = actionType; this.Key = Key; } } }