Fix VS Griping.
Fix loadCustomerView
This commit is contained in:
parent
2a8702e1a9
commit
ec0b1a00ae
@ -10,14 +10,14 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace QueueSys
|
namespace QueueSys
|
||||||
{
|
{
|
||||||
public class customerView
|
public class CustomerView
|
||||||
{
|
{
|
||||||
public string customerName { get; }
|
public string customerName { get; }
|
||||||
public string status { get; }
|
public string status { get; }
|
||||||
public string timeElapsed { get; }
|
public string timeElapsed { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class employeeView
|
public class EmployeeView
|
||||||
{
|
{
|
||||||
public int id { get; }
|
public int id { get; }
|
||||||
public string customer_name { get; set; }
|
public string customer_name { get; set; }
|
||||||
@ -28,7 +28,7 @@ namespace QueueSys
|
|||||||
|
|
||||||
public class SqliteDataAccess
|
public class SqliteDataAccess
|
||||||
{
|
{
|
||||||
public static List<employeeView> loadEmployeeView()
|
public static List<EmployeeView> LoadEmployeeView()
|
||||||
{
|
{
|
||||||
string strQuery = "SELECT id,customer_name,num_bags,employee,status FROM active_customers;";
|
string strQuery = "SELECT id,customer_name,num_bags,employee,status FROM active_customers;";
|
||||||
|
|
||||||
@ -36,23 +36,23 @@ namespace QueueSys
|
|||||||
//database will be closed, even in event of an application or computer crash.
|
//database will be closed, even in event of an application or computer crash.
|
||||||
using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
|
using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
|
||||||
{
|
{
|
||||||
var output = cnn.Query<employeeView>(strQuery, new DynamicParameters());
|
var output = cnn.Query<EmployeeView>(strQuery, new DynamicParameters());
|
||||||
return output.ToList();
|
return output.ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<customerView> loadCustomerView()
|
public static List<CustomerView> LoadCustomerView()
|
||||||
|
{
|
||||||
|
using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
|
||||||
{
|
{
|
||||||
string strQuery = "SELECT customer_name,status FROM active_customers;";
|
string strQuery = "SELECT customer_name,status FROM active_customers;";
|
||||||
|
|
||||||
using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString()))
|
var output = cnn.Query<CustomerView>(strQuery, new DynamicParameters());
|
||||||
{
|
|
||||||
var output = cnn.Query<employeeView>(strQuery, new DynamicParameters());
|
|
||||||
return output.ToList();
|
return output.ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void saveCustomer(employeeView customer)
|
public static void SaveCustomer(EmployeeView customer)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user