public string DelNotice(string itemsAppend) { string errorMsg = string.Empty; try { itemsAppend = itemsAppend.Trim(); if (string.IsNullOrEmpty(itemsAppend)) { return(MessageContent.Submit_InvalidRow); } string[] items = itemsAppend.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); Notice bll = new Notice(); bll.DeleteBatch(items.ToList <object>()); } catch (Exception ex) { errorMsg = ex.Message; } if (!string.IsNullOrEmpty(errorMsg)) { return(MessageContent.AlertTitle_Ex_Error + ":" + errorMsg); } return("1"); }
public string DelNotice(string itemsAppend) { string errorMsg = string.Empty; try { if (!HttpContext.Current.User.IsInRole("Administrators")) { return(MC.Role_InvalidError); } itemsAppend = itemsAppend.Trim(); if (string.IsNullOrEmpty(itemsAppend)) { return(MC.Submit_InvalidRow); } string[] items = itemsAppend.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); Notice bll = new Notice(); bll.DeleteBatch(items.ToList <object>()); return("1"); } catch (Exception ex) { errorMsg = ex.Message; } return(MC.GetString(MC.Submit_Ex_Error, errorMsg)); }