Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UserInfo u = new UserInfo(CookieName.MemberInfo);

            userName     = u.GetInfo(LoginInfo.UserName);
            userNickname = u.GetInfo(LoginInfo.Nickname);
            isLogin      = u.IsLogin();

            if (Function.IsPostMethod())
            {
                AddComment();
            }
            else
            {
                GetArgument();
                BindInfo();
                BindBooking();
                BindDay();
                GetLocation();
                BindComment();
                BindXiangRoute();
                bll.Updates("ViewCount=ViewCount+1", "ID=" + routeID);
                BindArticleList();
            }
        }
Пример #2
0
        private void updateRouteImg(HttpContext context)
        {
            ClassLibrary.BLL.Routes          routeBll  = new ClassLibrary.BLL.Routes();
            List <ClassLibrary.Model.Routes> routeList = routeBll.GetModelList(string.Empty);
            string fileFullPath = context.Server.MapPath(SysConfig.UploadFilePathRoutesImg);

            foreach (ClassLibrary.Model.Routes model in routeList)
            {
                string fileName = model.Image.Split(',')[0];
                if (!File.Exists(fileFullPath + fileName))
                {
                    continue;
                }
                //缩图
                Bitmap tmp  = new Bitmap(fileFullPath + fileName);
                Bitmap bmp0 = Function.MakeThumNail(tmp, 100, 64);
                tmp.Dispose();
                //bmp0.Save(fileFullPath + fileName);
                string ext         = Path.GetExtension(fileName);
                string appfileName = Function.GetRandomTime() + ext;
                Function.SaveBitmapImg(bmp0, fileFullPath + appfileName, ((long)90));
                bmp0.Dispose();

                routeBll.Updates("appImg = '" + appfileName + "'", "id = " + model.ID);
            }
            Print(context, "success");
        }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     GetArgument();
     BindInfo();
     BindRouteDays();
     BindBooking();
     bll.Updates("ViewCount=ViewCount+1", "ID=" + routeID);
     BindComment();
 }
Пример #4
0
        private void DisplayRoutes(HttpContext context)
        {
            string id = context.Request.QueryString["ids"];

            ClassLibrary.BLL.Routes rbll = new ClassLibrary.BLL.Routes();

            if (rbll.Updates("IsDisplay = 1", "id in (" + id + ")") > 0)
            {
                Print(context, "success");
            }
            else
            {
                Print(context, "errors");
            }
        }