public static List <WorkshopStatus> GetWorkshopStatusList() { List <WorkshopStatus> ds = new List <WorkshopStatus>(); try { DbCommand dbcmd = mDatabase.GetStoredProcCommand("uspGetWorkshopStatuses"); using (IDataReader reader = mDatabase.ExecuteReader(dbcmd)) { while (reader.Read()) { //iUserID vcWindowsLogin vcFirstName vcLastName vcEmail WorkshopStatus i = new WorkshopStatus(); i.SiWorkshopStatusID = reader["siWorkshopStatusID"] == DBNull.Value ? Convert.ToInt16(-1) : (Int16)reader["siWorkshopStatusID"]; i.VcDescription = reader["vcDescription"] == DBNull.Value ? "" : (string)reader["vcDescription"]; ds.Add(i); } } } catch (Exception ex) { throw ex; } return(ds); }
public WorkshopAdded(Guid id, string name, Guid cityId, WorkshopStatus status) { Id = id; Name = name; CityId = cityId; Status = status; }
public static List<WorkshopStatus> GetWorkshopStatusList() { List<WorkshopStatus> ds = new List<WorkshopStatus>(); try { DbCommand dbcmd = mDatabase.GetStoredProcCommand("uspGetWorkshopStatuses"); using (IDataReader reader = mDatabase.ExecuteReader(dbcmd)) { while (reader.Read()) { //iUserID vcWindowsLogin vcFirstName vcLastName vcEmail WorkshopStatus i = new WorkshopStatus(); i.SiWorkshopStatusID = reader["siWorkshopStatusID"] == DBNull.Value ? Convert.ToInt16(-1) : (Int16)reader["siWorkshopStatusID"]; i.VcDescription = reader["vcDescription"] == DBNull.Value ? "" : (string)reader["vcDescription"]; ds.Add(i); } } } catch (Exception ex) { throw ex; } return ds; }