Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 删除对应数据
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public int DeleteProvinceCity(object Id)
        {
            ProvinceCity bll = new ProvinceCity();

            return(bll.Delete(Id));
        }