Example #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            dbDataSet.OrdersRow order = (ordersBindingSource.Current as DataRowView).Row as dbDataSet.OrdersRow;

            bool notEnoughData =
                order.IsClientIdNull() ||
                order.IsNameNull() ||
                order.IsAdmissionDateNull() ||
                order.IsDeliveryDateNull()
            ;


            if (notEnoughData)
            {
                MessageBox.Show("Недостаточно данных для печати.\nПожалуйста, заполните все необходимые поля.", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            if (checkBoxContract.Checked)
            {
                PrintContract();
            }

            if (checkBoxTechnicalSpecification.Checked)
            {
                PrintTechnicalSpecification();
            }

            if (checkBoxCirtificateAccept.Checked)
            {
                PrintSertificateAccept();
            }

            if (checkBoxShedule.Checked)
            {
                PrintSheduleOfWork();
            }
        }