public Process(Dictionary <string, string> process, Exhibitor exhibitor, Employee employee, Schedule schedule, IList <Room> room) { var adapter = new DictionaryAdapter(process); Description = adapter.GetValue(DbQuery.DescriptionProperty); Title = adapter.GetValue(DbQuery.TitleProperty); Name = adapter.GetValue(DbQuery.NameProperty); LastUpdate = adapter.GetValue("lastUpdate"); ///////////////INPUTS//////////////// Id = int.Parse(adapter.GetValue("id")); try { Price = float.Parse(adapter.GetValue("price")); } catch (Exception e) { Console.WriteLine(e.Message); Price = null; } try { Result = int.Parse(adapter.GetValue("result")); } catch (Exception e) { Console.WriteLine(e.Message); Result = null; } Active = int.Parse(adapter.GetValue("active")); Exhibitor = exhibitor; Employee = employee; Schedule = schedule; Room = room; Pendent = new Pendent(this); Approved = new Approved(this); Denied = new Denied(this); Confirmed = new Confirmed(this); if (Result == null) { Actual = Pendent; } else if (Result != 0) { Actual = Active != 0 ? Approved : Confirmed; } else { Actual = Denied; } }
public Process(Exhibitor exhibitor, Employee employee, Schedule schedule, Room room) { ///////////////INPUTS//////////////// Exhibitor = exhibitor; Employee = employee; Schedule = schedule; Room = room; ///////////////////////////////////// Price = null; Result = null; Active = true; pendent = new Pendent(this); approved = new Approved(this); denied = new Denied(this); confirmed = new Confirmed(this); Actual = pendent; }
public Process(Exhibitor exhibitor, Employee employee, Schedule schedule, IList <Room> room, string name, string description, string title, string img) { ///////////////INPUTS//////////////// Exhibitor = exhibitor; Employee = employee; Schedule = schedule; Room = room; Name = name; Description = description; Title = title; Img = img; ///////////////////////////////////// Price = null; Result = null; Active = 1; Pendent = new Pendent(this); Approved = new Approved(this); Denied = new Denied(this); Confirmed = new Confirmed(this); Actual = Pendent; }