Esempio n. 1
0
 public HttpResponseBase DeleteEdmGroup()
 {
     string json = string.Empty;
     EdmGroup query = null;
     _edmGroup = new EdmGroupMgr(mySqlConnectionString);
     List<EdmGroup> list = new List<EdmGroup>();
     try
     {
         if (!string.IsNullOrEmpty(Request.Form["rowID"]))
         {
             string rowIDs = Request.Form["rowID"];
             if (rowIDs.IndexOf("|") != -1)
             {
                 foreach (string id in rowIDs.Split('|'))
                 {
                     if (!string.IsNullOrEmpty(id))
                     {
                         query = new EdmGroup();
                         query.group_id = Convert.ToUInt32(id);
                         list.Add(query);
                     }
                 }
             }
             json = _edmGroup.DeleteEdmGroup(list);
         }
     }
     catch (Exception ex)
     {
         Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage();
         logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message);
         logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
         log.Error(logMessage);
         json = "{success:false}";
     }
     this.Response.Clear();
     this.Response.Write(json);
     this.Response.End();
     return this.Response;
 }