Exemplo n.º 1
0
 public ReservationController()
 {
     this.selectClient          = new SelectClient();
     this.updateClient          = new UpdateClient(selectClient);
     this.selectServices        = new SelectServices();
     this.selectReservation     = new SelectReservation();
     this.selectEmployee        = new SelectEmployee();
     this.selectReservationList = new SelectReservation();
     this.getVReservation       = new CreateViewVreservation(selectClient, selectReservation, selectServices, selectEmployee);
     this.insertObjectToDB      = new FasadeInsertDB(new DBInsertClient(selectClient), new DBInsertServices(selectServices), new DBInsertReservation(selectReservation),
                                                     new DBInsertEmployee(selectEmployee), new SelectClient(), new SelectServices(), new SelectReservation(), new SelectEmployee());
     this.updateReservation = new UpdateReservation(selectReservation);
 }
Exemplo n.º 2
0
        public static string ToSql <T>(this IUpdateObject val)
        {
            var t = val.ValueType;

            if (t == typeof(bool))
            {
                var cval = val as UpdateObject <T, bool>;
            }
            else if (t == typeof(long))
            {
                var cval = val as UpdateObject <T, int>;
            }
            else if (t == typeof(Int16))
            {
                var cval = val as UpdateObject <T, short>;
            }
            else if (t == typeof(float))
            {
                var cval = val as UpdateObject <T, float>;
            }
            else if (t == typeof(double))
            {
                var cval = val as UpdateObject <T, double>;
            }
            else if (t == typeof(string))
            {
                var cval = val as UpdateObject <T, string>;
            }
            else if (t == typeof(byte))
            {
                var cval = val as UpdateObject <T, byte>;
            }
            else if (t == typeof(DateTime))
            {
                var cval = val as UpdateObject <T, DateTime>;
            }
            else if (t == typeof(Guid))
            {
                var cval = val as UpdateObject <T, Guid>;
            }
            else if (t == typeof(GeoPoint))
            {
                var cval = val as UpdateObject <T, GeoPoint>;
            }
            else if (t == typeof(JObject))
            {
                var cval = val as UpdateObject <T, JObject>;
            }
            return(null);
        }
Exemplo n.º 3
0
 public MainForm()
 {
     InitializeComponent();
     SqlLiteDB.SqlLiteDBCreateTableIFNotExist();
     this.selectClient      = new SelectClient();
     this.selectServices    = new SelectServices();
     this.selectReservation = new SelectReservation();
     this.selectEmployee    = new SelectEmployee();
     this.getVReservation   = new CreateViewVreservation(selectClient, selectReservation, selectServices, selectEmployee);
     this.updateClient      = new UpdateClient(selectClient);
     this.deleteReservation = new DeleteReservation();
     this.insertObjectToDB  = new FasadeInsertDB(new DBInsertClient(selectClient), new DBInsertServices(selectServices), new DBInsertReservation(selectReservation),
                                                 new DBInsertEmployee(selectEmployee), new SelectClient(), new SelectServices(), new SelectReservation(), new SelectEmployee());
 }
Exemplo n.º 4
0
 public void RemoveUpdateObject(IUpdateObject updateObject)
 {
     _updateObjects.Remove(updateObject);
 }
Exemplo n.º 5
0
 public void AddUpdateObject(IUpdateObject updateObject)
 {
     _updateObjects.Add(updateObject);
 }
 public void Setup()
 {
     selectClient = new SelectClient();
     updateClient = new UpdateClient(selectClient);
 }