private void Odrers_Click(object sender, EventArgs e) { form_orders = new OrdersForm(); form_orders.Show(); if (form_managers == null) { form_managers = new managers(); Shop.managers.openData(); } if (form_clients == null) { form_clients = new Clients(); Shop.Clients.openData(); } if (form_goods == null) { form_goods = new GoodsForm(); if (form_typegoods == null) { form_typegoods = new TypeGoodsForm(); TypeGoodsForm.openData(); } GoodsForm.openData(); } OrdersForm.openData(); }
static public void AddOrder(string[] arr) { Order newOrder = new Order(); newOrder.Code = Convert.ToDouble(arr[0]); newOrder.ISYourManager = (arr[1]); newOrder.IsYourClient = (arr[2]); newOrder.DateOrder = arr[3]; newOrder.IsYourGoods(arr[4]); Order[] new_arr = new Order[count() + 1]; for (int i = 0; i < new_arr.Length; i++) { if (i == new_arr.Length - 1) { new_arr[i] = newOrder; break; } new_arr[i] = array_of_Orders[i]; } array_of_Orders = new_arr; new_arr = null; OrdersForm.ShowNewOrder(newOrder); }