Ejemplo n.º 1
0
 public static void DeleteCard(CardProp cardProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         connection.Execute("DeleteCard", new { Card_ID = cardProp.Card_ID }, commandType: CommandType.StoredProcedure);
     }
 }
Ejemplo n.º 2
0
 public static void InsertCard(CardProp cardProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         DynamicParameters dp = new DynamicParameters();
         dp.AddDynamicParams(new
         {
             List_ID          = cardProp.List_ID,
             Card_Name        = cardProp.Card_Name,
             Card_Observing   = cardProp.Card_Observing,
             Card_Position    = cardProp.Card_Position,
             Card_Description = cardProp.Card_Description
         });
         connection.Execute("InsertCard", dp, commandType: CommandType.StoredProcedure);
     }
 }
Ejemplo n.º 3
0
 public CardForm(Data.CardProp _cardProp)
 {
     InitializeComponent();
     cardProp = new Data.CardProp();
     cardProp = _cardProp;
 }