Exemple #1
0
 private void btnPMs_Click(object sender, EventArgs e)
 {
     try
     {
         RPT.RPT_Single_Category RPT = new RPT.RPT_Single_Category();
         RPT.FRM_RPT_Medicine    FRM = new RPT.FRM_RPT_Medicine();
         RPT.SetParameterValue("@ID", txtID.Text);
         FRM.crystalReportViewer1.ReportSource = RPT;
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
 private void btnPA_Click(object sender, EventArgs e)
 {
     try
     {
         RPT.RPT_All_Categories RPT = new RPT.RPT_All_Categories();
         RPT.FRM_RPT_Medicine   FRM = new RPT.FRM_RPT_Medicine();
         RPT.Refresh();
         FRM.crystalReportViewer1.ReportSource = RPT;
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void button6_Click(object sender, EventArgs e)
 {
     try
     {
         //Print all medicine
         RPT.RPT_Medicines MedsReport = new RPT.RPT_Medicines();
         //
         RPT.FRM_RPT_Medicine FRM = new RPT.FRM_RPT_Medicine();
         //
         FRM.crystalReportViewer1.ReportSource = MedsReport;
         //
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                int Order_ID = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);

                this.Cursor = Cursors.WaitCursor;
                RPT.RPT_Orders       RPT = new RPT.RPT_Orders();
                RPT.FRM_RPT_Medicine FRM = new RPT.FRM_RPT_Medicine();
                RPT.SetDataSource(Order.Get_Order_Details(Order_ID));
                FRM.crystalReportViewer1.ReportSource = RPT;
                FRM.ShowDialog();
                this.Cursor = Cursors.Default;
            }
            catch
            {
                MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         //Print single medicine
         RPT.RPT_Med_Single MedReport = new RPT.RPT_Med_Single();
         //
         MedReport.SetParameterValue("@ID", this.dataGridView1.CurrentRow.Cells[0].Value.ToString());
         //
         RPT.FRM_RPT_Medicine FRM = new RPT.FRM_RPT_Medicine();
         //
         FRM.crystalReportViewer1.ReportSource = MedReport;
         //
         FRM.ShowDialog();
     }
     catch
     {
         MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #6
0
        private void button5_Click(object sender, EventArgs e)
        {
            try
            {
                //Get the last order
                int Order_ID = Convert.ToInt32(Order.Get_Last_Order_ID_For_Print().Rows[0][0]);

                this.Cursor = Cursors.WaitCursor;
                RPT.RPT_Orders       RPT = new RPT.RPT_Orders();
                RPT.FRM_RPT_Medicine FRM = new RPT.FRM_RPT_Medicine();
                RPT.SetDataSource(Order.Get_Order_Details(Order_ID));
                FRM.crystalReportViewer1.ReportSource = RPT;
                FRM.ShowDialog();
                this.Cursor = Cursors.Default;
            }
            catch
            {
                MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }