Example #1
0
 public EditOrder(ClientOrder currentOrder, string service)
 {
     InitializeComponent();
     this.currentOrder    = currentOrder;
     textBox3.Text        = currentOrder.getId().ToString();
     comboBox1.Text       = currentOrder.Product.ClassofProduct;
     comboBox2.Text       = currentOrder.Product.Category;
     comboBox3.Text       = currentOrder.Product.Type;
     textBox1.Text        = currentOrder.Product.Name;
     textBox2.Text        = currentOrder.getQuantity().ToString();
     textBox4.Text        = currentOrder.getCLient();
     textBox5.Text        = currentOrder.getAddress();
     dateTimePicker1.Text = currentOrder.Date.ToString();
     if (ClientManagerService.getInstance().isDeliver(currentOrder))
     {
         button1.Enabled  = false;
         textBox5.Enabled = false;
     }
     Text = service;
 }
Example #2
0
 public BookmakerInfClientOrder(ClientOrder currentOrder, string service, int fromWho)
 {
     InitializeComponent();
     this.currentOrder    = currentOrder;
     textBox1.Text        = currentOrder.getId().ToString();
     textBox2.Text        = currentOrder.Product.ClassofProduct;
     textBox3.Text        = currentOrder.Product.Category;
     textBox4.Text        = currentOrder.Product.Type;
     textBox5.Text        = currentOrder.Product.Name;
     textBox6.Text        = currentOrder.getQuantity().ToString();
     textBox7.Text        = currentOrder.getCLient();
     textBox8.Text        = currentOrder.getAddress();
     textBox9.Text        = currentOrder.Price.ToString();
     dateTimePicker1.Text = currentOrder.Date.ToString();
     Text         = service;
     this.fromWho = fromWho;
     if (fromWho == 1)
     {
         button1.Text = "Подтвердить";
     }
     if (fromWho == 2)
     {
         button1.Text = "Отправить Курьеру";
     }
     if (fromWho == 3)
     {
         button1.Text    = "Добавить в Доставки";
         button3.Visible = true;
         button3.Text    = "Пересобрать";
     }
     if (fromWho == 4)
     {
         button1.Text    = "Доставлено";
         button3.Visible = true;
         button3.Text    = "Отмена заказа";
     }
 }