예제 #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        iframShowFiles.Visible = false;
        DataSet   ds = new DataSet();
        DataTable dt = new DataTable();

        plant_Code = Session["User_ID"].ToString();
        dt         = Getdata(TextBox3.Text, TextBox4.Text, route_id, plant_Code, Company_code);
        ds.Tables.Add(dt);
        if (dt.Rows.Count > 0)
        {
            ///
            DataSet   ds1 = new DataSet();
            DataTable dt1 = new DataTable();
            dt1 = Getdata1(TextBox3.Text, TextBox4.Text, route_id, plant_Code, Company_code);
            ds1.Tables.Add(dt1);

            ///

            // int i = 1;
            //  for (i = 1; i <= dt1.Rows.Count; i++)
            //{

            int    i     = 1;
            string na    = Convert.ToString(i);
            string name1 = Server.MapPath(".") + "/kk/" + plant_Code.Trim() + "From" + TextBox3.Text.Trim() + "to" + TextBox4.Text.Trim() + '_' + "Bill";
            name2 = Server.MapPath(".") + "/kk/" + "Nasa-logo1.gif";
            //name2 = Server.MapPath(".") + "/kk/" + "onezero .jpg";
            SETBO();
            CreatePdf pd = new CreatePdf(ds, name1, i, ds1, Cpdf);
            pd.Execute();
            name1 = string.Empty;
        }
        else
        {
            uscMsgBox1.AddMessage("Report Not Found", MessageBoxUsc_Message.enmMessageType.Info);
        }
    }