Exemplo n.º 1
0
        private void prentmor()
        {
            DataTable tbl = new DataTable();

            tbl = db.Ce_runquery("select branch,month,year from mortd where branch='" + br_find1.SelectedValue + "' and month='" + mon_find.Text + "' and year='" + year_find.Text + "' ");

            if (br_find1.SelectedIndex != -1)
            {
                if (tbl.Rows.Count == 1)
                {
                    LocalReport.grama c = new LocalReport.grama((int)br_find1.SelectedValue, Convert.ToInt32(mon_find.Text), Convert.ToInt32(year_find.Text));
                    c.ShowDialog();
                    LocalReport.MortadRep x = new LocalReport.MortadRep((int)br_find1.SelectedValue, Convert.ToInt32(mon_find.Text), Convert.ToInt32(year_find.Text));
                    x.ShowDialog();
                }
                else
                {
                    MessageBox.Show("لم يتم تسجيل بيانات المرتد");
                }
            }
            else
            {
                MessageBox.Show("اختار الفرع من فضلك");
            }
        }
Exemplo n.º 2
0
        private void حسابالمرتدToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Program.def_P = "";
            DataTable tbl = new DataTable();

            tbl = db.Ce_runquery("select branch,month,year from mortd where branch='" + br_find1.SelectedValue + "' and month='" + mon_find.Text + "' and year='" + year_find.Text + "' ");
            if (tbl.Rows.Count == 1)
            {
                if (br_find1.SelectedIndex != -1)
                {
                    LocalReport.MortadRep c = new LocalReport.MortadRep((int)br_find1.SelectedValue, Convert.ToInt32(mon_find.Text), Convert.ToInt32(year_find.Text));
                    c.ShowDialog();
                }
                else
                {
                    MessageBox.Show("اختار الفرع من فضلك");
                }
            }
            else
            {
                MessageBox.Show("لم يتم تسجيل البيانات");
            }
        }