public static bool InsertApartInvoice(ApartInvoiceModel apartInvoice)
 {
     try
     {
         using (IDbConnection cnn = new MySqlConnection(LoadConnectionString()))
         {
             cnn.Execute("INSERT INTO apart (idDetailApart, idProduct, Quantity)" +
                         " VALUES(@idDetailApart, @idProduct, @Quantity)", apartInvoice);
         }
         return(true);
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Example #2
0
 public static bool InsertApartInvoice(string idDetailApart, string idProduct, string quantity)
 {
     try
     {
         ApartInvoiceModel inputInvoiceModel = new ApartInvoiceModel()
         {
             IdDetailApart = int.Parse(idDetailApart),
             IdProduct     = int.Parse(idProduct),
             Quantity      = int.Parse(quantity)
         };
         return(DBApartInvoice.InsertApartInvoice(inputInvoiceModel));
     }
     catch (Exception ex)
     {
         //Log4Net
         return(false);
     }
 }