private DataTable GetSerMonth() { var dbCon = DBConnection.Instance(); dbCon.IsConnect(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = dbCon.Connection; cmd.CommandType = CommandType.Text; cmd.CommandText = " SELECT serviceName, SUM(total_discounted_service) AS Expr1 FROM sales_report_service_view WHERE(MONTHNAME(_date) = '" + ((ComboBoxItem)ComboBoxMonth.SelectedItem).Content.ToString() + "') group by servicename "; DatasetReportSales.services_tDataTable dSItem = new DatasetReportSales.services_tDataTable(); MySqlDataAdapter mySqlDa = new MySqlDataAdapter(cmd); mySqlDa.Fill(dSItem); return(dSItem); }
private DataTable GetSerRange() { var dbCon = DBConnection.Instance(); dbCon.IsConnect(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = dbCon.Connection; cmd.CommandType = CommandType.Text; cmd.CommandText = " SELECT serviceName, SUM(total_discounted_service) AS Expr1 FROM sales_report_service_view WHERE(_date BETWEEN '" + DateStart.SelectedDate.Value.ToString("yyyy-MM-dd") + "' AND '" + DateEnd.SelectedDate.Value.ToString("yyyy-MM-dd") + "') group by servicename "; DatasetReportSales.services_tDataTable dSItem = new DatasetReportSales.services_tDataTable(); MySqlDataAdapter mySqlDa = new MySqlDataAdapter(cmd); mySqlDa.Fill(dSItem); return(dSItem); }
private DataTable GetSalesSer() { var dbCon = DBConnection.Instance(); dbCon.IsConnect(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = dbCon.Connection; cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT serviceName, SUM(total_discounted_service) AS Expr1 FROM sales_report_service_view GROUP BY serviceName "; DatasetReportSales.services_tDataTable dSItem = new DatasetReportSales.services_tDataTable(); MySqlDataAdapter mySqlDa = new MySqlDataAdapter(cmd); mySqlDa.Fill(dSItem); return(dSItem); }