Ejemplo n.º 1
0
 public static void DeleteItem(ItemProp itemProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         connection.Execute("DeleteItem", new { Item_ID = itemProp.Item_ID }, commandType: CommandType.StoredProcedure);
     }
 }
Ejemplo n.º 2
0
 public static void InsertItem(ItemProp itemProp)
 {
     using (IDbConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString))
     {
         connection.Open();
         DynamicParameters dp = new DynamicParameters();
         dp.AddDynamicParams(new
         {
             CheckList_ID     = itemProp.CheckList_ID,
             Item_Description = itemProp.Item_Description,
             Item_Checked     = itemProp.Item_Checked,
             Item_Position    = itemProp.Item_Position
         });
         connection.Execute("InsertItem", dp, commandType: CommandType.StoredProcedure);
     }
 }