コード例 #1
0
ファイル: SeoInfoEdit.aspx.cs プロジェクト: winteroflove/qu17
 private void BindData()
 {
     mymodel    = siBll.GetModel(seoId);
     seoTitle   = mymodel.SeoTitle;
     seoKey     = mymodel.SeoKeyword;
     seoDesc    = mymodel.SeoDescription;
     maxClassId = mymodel.MaxClassId;
 }
コード例 #2
0
ファイル: SeoInfoEdit.aspx.cs プロジェクト: winteroflove/qu17
        private void EditSeoInfo()
        {
            ClassLibrary.Model.SeoInfo siModel = new ClassLibrary.Model.SeoInfo();
            siModel.ID = Convert.ToInt32(Request.Form["seoId"]);
            if (Request.Form["classId1"] == "0")
            {
                Response.Write("<script>alert('请选择目的地!');history.back(-1);</script>");
                return;
            }
            if (Request.Form["themeId"] == "0" && Request.Form["routeDays"] == "0" && Request.Form["routePrice"] == "")
            {
                Response.Write("<script>alert('请选择组合条件!');history.back(-1);</script>");
                return;
            }
            siModel.MaxClassId = Convert.ToInt32(Request.Form["classId1"]);
            if (Request.Form["classId2"] != "")
            {
                siModel.RouteClassID = Convert.ToInt32(Request.Form["classId2"]);
            }
            else
            {
                siModel.RouteClassID = siModel.MaxClassId;
            }
            if (Request.Form["themeId"] != "0")
            {
                siModel.ThemeId = Convert.ToInt32(Request.Form["themeId"]);
            }
            if (Request.Form["routeDays"] != "0")
            {
                siModel.Days = Convert.ToInt32(Request.Form["routeDays"]);
            }
            siModel.Price          = Request.Form["routePrice"];
            siModel.SeoTitle       = Request.Form["SeoTitle"];
            siModel.SeoKeyword     = Request.Form["SeoKeywords"];
            siModel.SeoDescription = Request.Form["SeoDescription"];

            if (siBll.Update(siModel))
            {
                Function.goMessagePage("编辑SEO信息", "操作成功", "SeoInfo/SeoInfoList.aspx");
            }
            else
            {
                Function.goMessagePage("编辑SEO信息", "操作失败,请稍后再试", "SeoInfo/SeoInfoList.aspx");
            }
        }