public string DelProvinceCity(string id) { string errorMsg = string.Empty; try { if (!HttpContext.Current.User.IsInRole("Administrators")) { return(MC.Role_InvalidError); } if (string.IsNullOrWhiteSpace(id)) { return(MC.Submit_InvalidRow); } Guid gId = Guid.Empty; Guid.TryParse(id, out gId); if (gId.Equals(Guid.Empty)) { return(MC.GetString(MC.Submit_Params_GetInvalidRegex, "对应标识值")); } ProvinceCity bll = new ProvinceCity(); bll.Delete(gId); return("1"); } catch (Exception ex) { errorMsg = ex.Message; } return(MC.GetString(MC.Submit_Ex_Error, errorMsg)); }
public string DelProvinceCity(string id) { if (string.IsNullOrWhiteSpace(id)) { return(MessageContent.Submit_InvalidRow); } Guid gId = Guid.Empty; Guid.TryParse(id, out gId); if (gId.Equals(Guid.Empty)) { return(MessageContent.GetString(MessageContent.Submit_Params_GetInvalidRegex, "对应标识值")); } ProvinceCity bll = new ProvinceCity(); bll.Delete(gId); return("1"); }
/// <summary> /// 删除对应数据 /// </summary> /// <param name="Id"></param> /// <returns></returns> public int DeleteProvinceCity(object Id) { ProvinceCity bll = new ProvinceCity(); return(bll.Delete(Id)); }