public tbloeedashboardvariable GettbloeedashboardvariablesDet4(int MachineID, DateTime DateTimeValue) { tbloeedashboardvariable ddldet = new tbloeedashboardvariable(); Repository <tbloeedashboardvariable> lista = new Repository <tbloeedashboardvariable>(); try { string query = "SELECT * from [" + ConnectionFactory.DB + "].[" + ConnectionFactory.Schema + "].tbloeedashboardvariables WHERE WCID =" + MachineID + " and StartDate = '" + DateTimeValue + "'"; ddldet = lista.GetFirstOrDefault(query, _connectionFactory.GetConnection); } catch (Exception ex) { // MessageBox.Show(ex.ToString()); } return(ddldet); }
public tbloeedashboardvariable GettbloeedashboardvariablesDet3(int MachineID, DateTime StartDateFormatted) { tbloeedashboardvariable ddldet = new tbloeedashboardvariable(); Repository <tbloeedashboardvariable> lista = new Repository <tbloeedashboardvariable>(); try { string query = "SELECT MinorLosses from [i_facility_TSAL].[dbo].tbloeedashboardvariables WHERE WCID =" + MachineID + " and StartDate = '" + StartDateFormatted + "'"; ddldet = lista.GetFirstOrDefault(query, _connectionFactory.GetConnection); } catch (Exception ex) { // MessageBox.Show(ex.ToString()); } return(ddldet); }
public double GettbloeedashboardvariablesDet3(int MachineID, DateTime StartDateFormatted) { IntoFile("GettbloeedashboardvariablesDet3" + MachineID); IntoFile("GettbloeedashboardvariablesDet3" + StartDateFormatted); double det = 0.0; tbloeedashboardvariable ddldet = new tbloeedashboardvariable(); Repository <tbloeedashboardvariable> lista = new Repository <tbloeedashboardvariable>(); try { string query = "SELECT MinorLosses from [" + ConnectionFactory.DB + "].[" + ConnectionFactory.Schema + "].tbloeedashboardvariables WHERE WCID =" + MachineID + " and StartDate = '" + StartDateFormatted + "'"; IntoFile("GettbloeedashboardvariablesDet3" + query); ddldet = lista.GetFirstOrDefault(query, _connectionFactory.GetConnection); det = (double)ddldet.MinorLosses; } catch (Exception ex) { // MessageBox.Show(ex.ToString()); } return(det); }