示例#1
0
        private void buttonBILLPrint_Click(object sender, EventArgs e)
        {
            if (dataViewBill.SelectedRows.Count > 0)
            {
                // Get bill for print
                Bill billDetail = Bill.GetBill(Convert.ToInt32(dataViewBill.SelectedRows[0].Cells[0].Value.ToString()));

                FormReport reportForm = new FormReport();

                switch (billDetail.BillTypeID)
                {
                case Bill.MEDICINEBILL:
                    reportForm.ReportType = "MEDICINEBILL";
                    reportForm.ObjectID   = billDetail.BillID;
                    break;

                case Bill.SERVICEBILL:
                    reportForm.ReportType = "SERVICEBILL";
                    reportForm.ObjectID   = billDetail.BillID;
                    break;

                case Bill.MATERIALBILL:
                    reportForm.ReportType = "MATERIALBILL";
                    reportForm.ObjectID   = billDetail.BillID;
                    break;

                default:
                    MessageBox.Show("Vui lòng chọn hóa đơn để in!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                reportForm.Show();
            }
        }
示例#2
0
        private void buttonStatisticsReport_Click(object sender, EventArgs e)
        {
            FormReport reportForm = new FormReport();

            switch (comboBoxStatisticsType.SelectedIndex)
            {
            case 0:
                reportForm.ReportType = "REVENUEBYDAY";
                break;

            case 1:
                reportForm.ReportType = "REVENUEBYMONTH";
                break;

            case 2:
                reportForm.ReportType = "REVENUEBYYEAR";
                break;

            default:
                MessageBox.Show("Chọn loại thống kê!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            reportForm.DATEFROM = dateTimeInputStatisticsDateFrom.Value;
            reportForm.DATETO   = dateTimeInputStatisticsDateTo.Value;
            reportForm.Show();
        }
示例#3
0
        private void buttonExamination_Click(object sender, EventArgs e)
        {
            if (dataViewExamination.SelectedRows.Count > 0)
            {
                ExaminationCertificate ECPrint = ExaminationCertificate.GetEC(Convert.ToInt32(dataViewExamination.SelectedRows[0].Cells[0].Value));

                FormReport reportForm = new FormReport();

                reportForm.ReportType = "EC";
                reportForm.ObjectID = ECPrint.ECID;
                reportForm.Show();
            }
        }
示例#4
0
        private void buttonStatisticsReport_Click(object sender, EventArgs e)
        {
            FormReport reportForm = new FormReport();

            switch (comboBoxStatisticsType.SelectedIndex)
            { 
                case 0:
                    reportForm.ReportType = "REVENUEBYDAY";                    
                    break;
                case 1:
                    reportForm.ReportType = "REVENUEBYMONTH";
                    break;
                case 2:
                    reportForm.ReportType = "REVENUEBYYEAR";
                    break;
                default:
                    MessageBox.Show("Chọn loại thống kê!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
            }

            reportForm.DATEFROM = dateTimeInputStatisticsDateFrom.Value;
            reportForm.DATETO = dateTimeInputStatisticsDateTo.Value;
            reportForm.Show();
        }
示例#5
0
        private void buttonBILLPrint_Click(object sender, EventArgs e)
        {
            if (dataViewBill.SelectedRows.Count > 0)
            {
                // Get bill for print
                Bill billDetail = Bill.GetBill(Convert.ToInt32(dataViewBill.SelectedRows[0].Cells[0].Value.ToString()));

                FormReport reportForm = new FormReport();

                switch (billDetail.BillTypeID)
                {
                    case Bill.MEDICINEBILL:
                        reportForm.ReportType = "MEDICINEBILL";
                        reportForm.ObjectID = billDetail.BillID;
                        break;
                    case Bill.SERVICEBILL:
                        reportForm.ReportType = "SERVICEBILL";
                        reportForm.ObjectID = billDetail.BillID;
                        break;
                    case Bill.MATERIALBILL:
                        reportForm.ReportType = "MATERIALBILL";
                        reportForm.ObjectID = billDetail.BillID;
                        break;
                    default:
                        MessageBox.Show("Vui lòng chọn hóa đơn để in!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                }

                reportForm.Show();

            }
        }