protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     try
     {
         SystemUser user = new SystemUser();
         if (e.CommandName == "btnConfirm")
         {
             string BatchCode = e.Item.Cells[0].Text;
             string ret       = Process.ConfirmBillSystemUpdate(BatchCode);
             ShowMessage(ret, false);
             LoadBatches();
         }
         else if (e.CommandName == "btndownload")
         {
             string BatchCode = e.Item.Cells[0].Text;
             string BillCode  = e.Item.Cells[5].Text;
             int    trans     = int.Parse(e.Item.Cells[6].Text);
             double total     = double.Parse(e.Item.Cells[7].Text.Replace(",", ""));
             string batchType = e.Item.Cells[8].Text;
             if (batchType.Equals("P"))
             {
                 string filePath = bll.BuildBatchfile(BatchCode, BillCode, trans, total);
                 DownloadFile(filePath, true);
             }
             else
             {
                 DownloadBatch(BatchCode);
             }
         }
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, true);
     }
 }