protected void BtnPrintPaidInvoices_Click(object sender, EventArgs e)
 {
     PrintBidSheetController bspCtrl = new PrintBidSheetController();
     List<string> itemNumbersToPrint = new List<string>();
     string templatePath = Server.MapPath("~\\PDF\\BidSheet.pdf");
     string temporaryPath = Server.MapPath("~\\PDF\\temp.pdf");
     string savePath = Server.MapPath("~\\PDF\\Filled.pdf");
     foreach (GridViewRow row in ItemStatusGrid.Rows)
     {
         // Access the CheckBox
         CheckBox cb = (CheckBox)row.FindControl("CheckBox2");
         if (cb != null && cb.Checked)
         {
             int firstDigit = row.Cells[2].Text.IndexOfAny("0123456789".ToCharArray());
             string categoryID = row.Cells[2].Text.Substring(0, firstDigit);
             string itemNumber = row.Cells[2].Text.Substring(firstDigit);
             itemNumbersToPrint.Add(itemNumber);
         }
     }
     int i = bspCtrl.PrintSheets(itemNumbersToPrint, savePath, templatePath, temporaryPath);
     if(i>0)
     {
         Response.Redirect("BidSheets.aspx");
     }
 }
        protected void BtnPrintBid_Click(object sender, EventArgs e)
        {
            PrintBidSheetController bsCtrl = new PrintBidSheetController();
            List<string> itemNumbersToPrint = new List<string>();
            itemNumbersToPrint.Add(ItemID.Text);
            string templatePath = Server.MapPath("~\\PDF\\BidSheet.pdf");
            string temporaryPath = Server.MapPath("~\\PDF\\temp.pdf");
            string savePath = Server.MapPath("~\\PDF\\Filled.pdf");

            int i = bsCtrl.PrintSheets(itemNumbersToPrint, savePath, templatePath, temporaryPath);
            if (i > 0)
            {
                Response.Redirect("BidSheets.aspx");
            }
        }
 protected void BtnPrintInvoices_Click(object sender, EventArgs e)
 {
     PrintBidSheetController bspCtrl = new PrintBidSheetController();
     List<string> itemNumbersToPrint = new List<string>();
     string templatePath = Server.MapPath("~\\PDF\\BidSheet.pdf");
     string temporaryPath = Server.MapPath("~\\PDF\\temp.pdf");
     string savePath = Server.MapPath("~\\PDF\\Filled.pdf");
     foreach (GridViewRow row in GridViewItemsByItemId.Rows)
     {
         // Access the CheckBox
         CheckBox cb = (CheckBox)row.FindControl("CheckBox2");
         if (cb != null && cb.Checked)
         {
             itemNumbersToPrint.Add(row.Cells[3].Text);
         }
     }
     bspCtrl.PrintSheets(itemNumbersToPrint, savePath, templatePath, temporaryPath);
     Response.Redirect("BidSheets.aspx");
 }