private void btnAddOrderDet_Click(object sender, EventArgs e)
        {
            OrderForm sForm = new OrderForm(cmbDimension.SelectedIndex + 1);
              DialogResult dr = sForm.ShowDialog();

              if (dr != System.Windows.Forms.DialogResult.OK)
            return;
              int c = sForm.Count;
              lbxOrderDetails.Items.Add("Detail_" + lbxOrderDetails.Items.Count.ToString() + "    num:" + c.ToString());
              order.Add(new OrderPair(sForm.Detail, sForm.Count));
        }
        private void lbxOrderDetails_DoubleClick(object sender, EventArgs e)
        {
            int ind = lbxOrderDetails.SelectedIndex;
              if (ind == -1) return;

              OrderForm sForm = new OrderForm(order[ind].Detail, order[ind].Num);
              DialogResult dr = sForm.ShowDialog();

              if (dr != System.Windows.Forms.DialogResult.OK)
            return;

              int c = sForm.Count;
              lbxOrderDetails.Items[ind] = ("Detail_" + ind.ToString() + "   num:" + c.ToString());
              order[ind] = new OrderPair(sForm.Detail, sForm.Count);

              pgrdOrderDetail.SelectedObject = order[ind].Detail;
        }