Ejemplo n.º 1
0
        public MidContainerForm(Form repairDetailForm, Repair repair, StartupTypeForm startupTypeForm, List <double> totalPrice, List <int> totalAmount)
        {
            InitializeComponent();

            _repair           = repair;
            _repairDetailForm = repairDetailForm;

            if (startupTypeForm == StartupTypeForm.Предметы)
            {
                var childItemsForm = new ItemsForm(this, _repair, labelTotal, totalPrice, totalAmount);
                childItemsForm.Show();
            }
            else if (startupTypeForm == StartupTypeForm.Мастера)
            {
                var childMastersForm = new MastersForm(this, _repair, labelTotal, totalPrice, totalAmount);
                childMastersForm.Show();
            }

            _totalPrice     = totalPrice;
            _totalAmount    = totalAmount;
            labelTotal.Text = new StringBuilder().Append("Стоимость предметов: ").Append(_totalPrice[0])
                              .Append(", общее кол-во предметов: ").Append(_totalAmount[0]).Append(
                "                                                                      стоимость работы мастеров: ")
                              .Append(_totalPrice[1]).Append(", общая продолжительность работы (в днях): ").Append(_totalAmount[1])
                              .ToString();
        }
Ejemplo n.º 2
0
        private void withMastersToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            var childMastersForm = new MastersForm(this, _repair, labelTotal, _totalPrice, _totalAmount);

            childMastersForm.Show();
        }