示例#1
0
        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox1.Text != "")
                {
                    //درصورتی که سبک کارت انتخاب شده وجود داشت یا به عبارتی حذف نشده اند
                    if (Print_Yaddasht_NotImg_YesImg == "Yes_Img")
                    {
                        Report6 r = new Report6("..\\Debug\\rpt\\rpt6\\Print_Yaddasht_Not_Img.rdlc", "select * from Yaddasht,ser where  شماره like'" + textBox1.Text + "' ");
                        r.ShowDialog();
                    }

                    //استفاده بکن Fix_Report_Card.rdlcدرصورتی که سبک کارت وجود ندارد از
                    //تغییر کند sql و همچنین کد

                    else if (Print_Yaddasht_NotImg_YesImg == "Not_Img")
                    {
                        Report6 r = new Report6("..\\Debug\\rpt\\rpt6\\Print_Yaddasht_Yes_Img.rdlc", "select * from Yaddasht,ser where  شماره like '" + textBox1.Text + "' ");
                        r.ShowDialog();
                    }
                }

                else
                {
                    MsgBox.ShowMessage(this.Handle.ToInt32(), "هیچ یادداشتی نمایان نیست ", "   ", "تایید", "", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign);
                }
            }

            catch (Exception ex)
            {
                MsgBox.ShowMessage(this.Handle.ToInt32(), ex.Message.ToString(), "خطا", "تایید", "", "", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign);
            }
        }
示例#2
0
        private void تمامیادداشتهاToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Report6 r = new Report6("..\\Debug\\rpt\\rpt6\\Print_Yaddasht_Yes_Img.rdlc", "select * from Yaddasht,ser");

            r.ShowDialog();
        }