Пример #1
0
 void HandleNewOrderClicked(object sender, NewOrderEventArgs e)
 {
     if (NewOrderClicked != null)
     {
         NewOrderClicked(this, e);
     }
 }
Пример #2
0
 protected void OnNewOrder(object sender, NewOrderEventArgs arg)
 {
     Order OrderWin = new Order((Order.OrderType)arg.OrderType, arg.Date, arg.Hour);
     OrderWin.NewItem = true;
     OrderWin.Show();
     int result = OrderWin.Run();
     if (result == (int)ResponseType.Ok)
         ((OrdersCalendar)sender).RefreshOrders();
     OrderWin.Destroy();
 }
Пример #3
0
 protected void OnNewOrderClicked(int ordertypeid)
 {
     EventHandler<NewOrderEventArgs> handler = NewOrderClicked;
     if (handler != null)
     {
         NewOrderEventArgs e = new NewOrderEventArgs();
         e.OrderType = ordertypeid;
         handler(this, e);
     }
 }
Пример #4
0
 protected void OnButtonNewOrderClick(object sender, NewOrderEventArgs e)
 {
     CalendarHBox box = (CalendarHBox)sender;
     EventHandler<NewOrderEventArgs> handler = NewOrder;
     if (handler != null)
     {
         int x, y;
         GetCalendarPosition(box, out x, out y);
         e.Date = _StartDate.AddDays(x);
         e.Hour = y;
         e.result = false;
         handler(this, e);
         if (e.result)
             RefreshOrders();
     }
 }
Пример #5
0
 public bool CreateNewOrder(DateTime date, int hour, int ordertype)
 {
     EventHandler<NewOrderEventArgs> handler = NewOrder;
     if (handler != null)
     {
         NewOrderEventArgs arg = new NewOrderEventArgs();
         arg.Date = date;
         arg.Hour = hour;
         arg.OrderType = ordertype;
         arg.result = false;
         handler(this, arg);
         if (arg.result)
             RefreshOrders();
         return arg.result;
     }
     return false;
 }