Ejemplo n.º 1
0
        public int gettype()
        {
            int type = 11;

            try
            {
                if (Request["type"] != null)
                {
                    int pid = NewsTypeService.GetPid(int.Parse(Request["type"]));
                    if (pid == 0)//是父类
                    {
                        type = NewsTypeService.GetTypeidByPid(int.Parse(Request["type"]));
                    }
                    else
                    {
                        type = int.Parse(Request["type"]);
                    }
                }
            }
            catch (Exception e)
            {
                Response.Redirect("page404.aspx?e=" + "error type");
            }

            return(type);
        }