Beispiel #1
0
 void hesap_RemoveClick(SortedDictionary <string, Control> controls)
 {
     try
     {
         if (!string.IsNullOrEmpty(Request.QueryString["uid"]))
         {
             using (Hesap hsp = HesapMethods.GetHesap(BAYMYO.UI.Converts.NullToGuidString(Request.QueryString["uid"])))
             {
                 BAYMYO.UI.FileIO.Remove(Server.MapPath(Settings.JSonPath + "maps/" + hsp.ID + ".js"));
                 MakaleMethods.Delete(hsp.ID);
                 if (!string.IsNullOrEmpty(hsp.ProfilObject.ID))
                 {
                     if (ProfilMethods.Delete(hsp.ProfilObject) > 0)
                     {
                         BAYMYO.UI.FileIO.Remove(Server.MapPath(Settings.ImagesPath + "profil/" + hsp.ProfilObject.ResimUrl));
                         HesapMethods.Delete(hsp);
                         CustomizeControl1.MessageText = MessageBox.Show(ProccesType.Delete, DialogResult.Succes);
                         Core.ClearControls(controls);
                     }
                 }
                 else
                 {
                     HesapMethods.Delete(hsp);
                     CustomizeControl1.MessageText = MessageBox.Show(ProccesType.Delete, DialogResult.Succes);
                     Core.ClearControls(controls);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         CustomizeControl1.MessageText = MessageBox.Show(DialogResult.Error, ex.Message);
     }
     finally
     {
         jSonData.CreateData("doktorlar");
     }
 }