Пример #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string tableExtension = DropDownList2.SelectedValue.ToLower();

            //for show data
            con.Open();
            string sql = "SELECT * FROM apply" + tableExtension + " inner join dbbl,student  where apply" + tableExtension + ".mobile_no = dbbl.mobile_no and apply" + tableExtension + ".tx_id = dbbl.tx_id  and student.ROLL_NO=dbbl.hsc_roll and apply" + tableExtension + ".serialNo ='" + TextBox1.Text + "' ";

            //SELECT * FROM `student` WHERE `BOARD_NAME`='RAJSHAHI' and `ROLL_NO`= '135323' and `PASS_YEAR`='2011'
            MySqlCommand cmd = new MySqlCommand(sql, con);


            MySqlDataReader reader = cmd.ExecuteReader();

            while (reader.Read())
            {
                string         serial  = reader.GetString(0).ToString();
                string         name    = reader.GetString(12).ToString();
                string         fname   = reader.GetString(13).ToString();
                string         mname   = reader.GetString(14).ToString();
                string         hscroll = reader.GetString(17).ToString();
                string         imgpath = reader.GetString(1).ToString() + "_" + reader.GetString(2).ToString() + ".jpg";
                createAdmitPDF a       = new createAdmitPDF();
                a.createPDF(DropDownList2.SelectedValue, hscroll, serial, name, fname, mname, imgpath);
            }

            reader.Close();
            con.Close();

            //end show data
            Response.Redirect("~/PDFs/Doc2.pdf");
        }
Пример #2
0
 public void showadmitcard(string unitName, Label lblName)
 {
     if (File.Exists(Server.MapPath("~/Images/") + mobileNoPanel7.Text + "_" + tx_idPanel7.Text + ".jpg"))
     {
         string studentImgPath = mobileNoPanel7.Text + "_" + tx_idPanel7.Text + ".jpg";
         //mobileNoPanel7.Text+"_"+tx_idPanel7.Text+".jpg"
         createAdmitPDF a = new createAdmitPDF();
         a.createPDF(unitName, rollL.Text, lblName.Text, nameL.Text, f_nameL.Text, m_nameL.Text, studentImgPath);
         Response.Redirect("~/PDFs/Doc2.pdf");
     }
     else
     {
         infoL.Visible = true;
         infoL.Text    = "Please Upload your own Image.";
         infoL.Focus();
     }
 }