Пример #1
0
        //add parts

        private void b_ADD_Click(object sender, EventArgs e)
        {
            var partsDialog = new PartsDialog(MiscController, true);


            if (partsDialog.ShowDialog() == DialogResult.OK)
            {
                if (partsDialog.SelectedParts != null)
                {
                    lb_Parts.Items.AddRange(partsDialog
                                            .SelectedParts
                                            .ToArray());
                }

                decimal.TryParse(tb_labour.Text, out decimal labour);
                CardModel.TotalPrice = SumPartsPrice() + labour;

                lbl_PPrice.Text = CardModel.TotalPrice.ToString("C");
            }
        }
Пример #2
0
        private void allPartsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dialog = new PartsDialog(Dependancies.MiscController, false);

            dialog.ShowDialog();
        }