public int InsertChartweb(ChartWebHyip web) { int result = 0; try { result = conector.InsertTableChartWeb(web); return(result); } catch (Exception ex) { throw ex; } }
public int InsertTableChartWeb(ChartWebHyip chart) { try { string sql = " insert into ChartWebHyip values(" + chart.MaWeb + ",'" + chart.Today + "'," + chart.TotalDeposit + "," + chart.TotalWithdraw + ") "; cmd = new SqlCommand(sql); cmd.Connection = conn; this.openConnection(); int result = cmd.ExecuteNonQuery(); this.closeConnection(); return(result); } catch (Exception ex) { throw ex; } }