Example #1
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         Int32          PartnerID     = Globals.GetIntFromQueryString("PartnerID");
         OtherFunctions obj           = new OtherFunctions();
         String         imageFileName = obj.GetPartnerLogoByPartnerID(PartnerID);
         Globals.DeleteFile(imageFileName);
         obj.DeletePartner(PartnerID);
         LoadGridViewPartner();
     }
     catch { }
 }
Example #2
0
 protected void gridViewPartner_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     try
     {
         GridViewRow    row           = gridViewPartner.Rows[e.RowIndex];
         Int32          PartnerID     = Convert.ToInt32(((Label)row.Cells[0].FindControl("lblPartnerID")).Text);
         OtherFunctions obj           = new OtherFunctions();
         String         imageFileName = obj.GetPartnerLogoByPartnerID(PartnerID);
         Globals.DeleteFile(imageFileName);
         obj.DeletePartner(PartnerID);
         LoadGridViewPartner();
     }
     catch { }
 }