Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("slide-mng", "stop");
     id = Str2Str(q("id"));
     doh.Reset();
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_slide", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(txtUrl1, "Url1", true);
     wh.AddBind(txtImg1, "Img1", true);
     wh.AddBind(txtUrl2, "Url2", true);
     wh.AddBind(txtImg2, "Img2", true);
     wh.AddBind(txtUrl3, "Url3", true);
     wh.AddBind(txtImg3, "Img3", true);
     wh.AddBind(txtUrl4, "Url4", true);
     wh.AddBind(txtImg4, "Img4", true);
     wh.AddBind(txtUrl5, "Url5", true);
     wh.AddBind(txtImg5, "Img5", true);
     wh.AddBind(txtWidth, "Width", false);
     wh.AddBind(txtHeight, "Height", false);
     wh.AddBind(rblState, "SelectedValue", "State", false);
     if (id != "0")
     {
         wh.ConditionExpress = "id=" + id.ToString();
         wh.Mode             = JumboECMS.DBUtility.OperationType.Modify;
     }
     else
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
     wh.validator = chkForm;
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     CategoryId = Str2Str(q("categoryid"));
     id         = Str2Str(q("id"));
     if (id == "0")
     {
         Admin_Load("product-add", "html", "product");
     }
     else
     {
         Admin_Load("product-edit", "html", "product");
     }
     this.txtEditor.Text = AdminName;
     getEditDropDownList(CategoryId, ModuleType, ref ddlReadGroup);
     //没有下面这段,浏览功能就失效
     Session["FCKeditor:UserUploadPath"] = this.MainModule.UploadPath;
     this.FCKeditor1.BasePath            = site.Dir + "_libs/fckeditor/";
     doh.Reset();
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_module_product", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(txtTColor, "TColor", true);
     wh.AddBind(ref CategoryId, "CategoryId", false);
     wh.AddBind(ddlReadGroup, "ReadGroup", false);
     wh.AddBind(txtAuthor, "Author", true);
     wh.AddBind(txtEditor, "Editor", true);
     wh.AddBind(txtUserId, "UserId", false);
     wh.AddBind(txtTags, "Tags", true);
     wh.AddBind(txtPrice0, "Price0", false);
     wh.AddBind(txtPrice1, "Price1", false);
     wh.AddBind(txtImg, "Img", true);
     wh.AddBind(rblIsTop, "SelectedValue", "IsTop", false);
     wh.AddBind(FCKeditor1, "Value", "Content", true);
     wh.AddBind(txtSummary, "Summary", true);
     wh.AddBind(chkIsEdit, "1", "IsPass", false);
     wh.AddBind(txtAddDate, "AddDate", true);
     wh.AddBind(txtAliasPage, "AliasPage", true);
     if (id == "0")
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
         if (IsPower(this.MainModule.Type + "-audit"))
         {
             this.chkIsEdit.Checked = true;
         }
     }
     else
     {
         wh.ConditionExpress = "id=" + id + " AND [CategoryId]=" + CategoryId;
         wh.Mode             = JumboECMS.DBUtility.OperationType.Modify;
     }
     if (this.MainModule.IsHtml)
     {
         this.ddlReadGroup.Enabled = false;
     }
     wh.BindBeforeAddOk    += new EventHandler(bind_ok);
     wh.BindBeforeModifyOk += new EventHandler(bind_ok);
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
     wh.validator = chkForm;
 }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _lan = q("lan");

            id = Str2Str(q("id"));
            Admin_Load("class-mng", "stop");
            if (!Page.IsPostBack)
            {
                doh.Reset();
                doh.SqlCmd = "SELECT [ID],[Title],[code] FROM [" + base.CategoryTable + "] WHERE [LanguageCode]='" + _lan + "' AND  len(code)<16 and [TypeId]<2 ORDER BY code";
                DataTable dtCategory = doh.GetDataTable();
                for (int i = 0; i < dtCategory.Rows.Count; i++)
                {
                    ListItem li = new ListItem();
                    li.Value = dtCategory.Rows[i]["Id"].ToString();
                    li.Text  = "├-" + getListName(dtCategory.Rows[i]["Title"].ToString(), dtCategory.Rows[i]["code"].ToString());
                    this.ddlParentId.Items.Add(li);
                }
                dtCategory.Clear();
                dtCategory.Dispose();
                doh.Reset();
                doh.SqlCmd = "SELECT [ID],[Title] FROM [jcms_normal_template] WHERE [LanguageCode]='" + _lan + "' AND   sType='single' ORDER BY IsDefault desc";
                DataTable dtTemplate1 = doh.GetDataTable();
                for (int i = 0; i < dtTemplate1.Rows.Count; i++)
                {
                    ListItem li1 = new ListItem();
                    li1.Value = dtTemplate1.Rows[i]["Id"].ToString();
                    li1.Text  = dtTemplate1.Rows[i]["Title"].ToString();
                    this.ddlTemplateId.Items.Add(li1);
                }
                dtTemplate1.Clear();
                dtTemplate1.Dispose();
            }
            JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, base.CategoryTable, btnSave);
            wh.AddBind(txtTitle, "Title", true);
            wh.AddBind(txtSortRank, "SortRank", false);
            wh.AddBind(ddlParentId, "ParentId", false);
            wh.AddBind(txtInfo, "Info", true);
            wh.AddBind(ddlTemplateId, "TemplateId", false);
            wh.AddBind(txtAliasPage, "AliasPage", true);
            if (id == "0")
            {
                wh.Mode = JumboECMS.DBUtility.OperationType.Add;
            }
            else
            {
                wh.ConditionExpress      = "id=" + id;
                wh.Mode                  = JumboECMS.DBUtility.OperationType.Modify;
                this.ddlParentId.Enabled = false;
            }
            wh.BindBeforeAddOk    += new EventHandler(bind_ok);
            wh.BindBeforeModifyOk += new EventHandler(bind_ok);
            wh.AddOk    += new EventHandler(add_ok);
            wh.ModifyOk += new EventHandler(save_ok);
            wh.validator = chkForm;
        }
Пример #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     id   = Str2Str(q("id"));
     type = q("type");
     Admin_Load("adv-mng", "stop");
     if (!Page.IsPostBack)
     {
         doh.Reset();
         doh.SqlCmd = "SELECT [ID],[Title],[code] FROM [jcms_normal_advclass] ORDER BY id asc";
         DataTable dtClass = doh.GetDataTable();
         if (dtClass.Rows.Count == 0)
         {
             dtClass.Clear();
             dtClass.Dispose();
             Response.Write("请先添加分类!");
             Response.End();
         }
         for (int i = 0; i < dtClass.Rows.Count; i++)
         {
             this.ddlAdvType.Items.Add(new ListItem(dtClass.Rows[i]["Title"].ToString(), dtClass.Rows[i]["Code"].ToString()));
         }
         dtClass.Clear();
         dtClass.Dispose();
         if (type != "")
         {
             this.ddlAdvType.SelectedValue = type;
         }
     }
     doh.Reset();
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_adv", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(ddlAdvType, "AdvType", false);
     wh.AddBind(txtUrl, "Url", true);
     wh.AddBind(txtPicurl, "Picurl", true);
     wh.AddBind(rbtState, "SelectedValue", "State", false);
     wh.AddBind(txtContent, "Content", true);
     wh.AddBind(txtAddDate, "AddDate", true);
     wh.AddBind(txtWidth, "Width", false);
     wh.AddBind(txtHeight, "Height", false);
     if (id == "0")
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     else
     {
         wh.ConditionExpress = "id=" + id;
         //this.ddlAdvType.Enabled = false;
         wh.Mode = JumboECMS.DBUtility.OperationType.Modify;
     }
     wh.BindBeforeAddOk    += new EventHandler(bind_ok);
     wh.BindBeforeModifyOk += new EventHandler(bind_ok);
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
     wh.validator = chkForm;
 }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("master", "stop");
     id = Str2Str(q("id"));
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_user", btnSave);
     wh.AddBind(txtUserName, "UserName", true);
     this.txtUserName.ReadOnly = true;
     wh.ConditionExpress       = "id=" + id;
     wh.Mode      = JumboECMS.DBUtility.OperationType.Modify;
     wh.validator = chkForm;
     wh.ModifyOk += new EventHandler(save_ok);
 }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     id = Str2Str(q("id"));
     Admin_Load("page-mng", "stop");
     Session["FCKeditor:UserUploadPath"] = MainModule.UploadPath;
     this.FCKeditor1.BasePath            = site.Dir + "_libs/fckeditor/";
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, base.CategoryTable, btnSave);
     wh.AddBind(lblTitle, "Title", true);
     wh.AddBind(txtInfo, "Info", true);
     wh.AddBind(txtKeywords, "Keywords", true);
     wh.AddBind(txtImg, "Img", true);
     wh.AddBind(FCKeditor1, "Value", "Content", true);
     wh.ConditionExpress    = "id=" + id;
     wh.Mode                = JumboECMS.DBUtility.OperationType.Modify;
     wh.BindBeforeModifyOk += new EventHandler(bind_ok);
     wh.ModifyOk           += new EventHandler(save_ok);
     wh.validator           = chkForm;
 }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("0001", "html");
     id = Str2Str(q("id"));
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_email", btnSave);
     wh.AddBind(txtNickName, "NickName", true);
     wh.AddBind(txtEmailAddress, "EmailAddress", true);
     wh.AddBind(rbtState, "SelectedValue", "State", false);
     if (id == "0")
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     else
     {
         wh.ConditionExpress = "id=" + id;
         wh.Mode             = JumboECMS.DBUtility.OperationType.Modify;
     }
     wh.validator = chkForm;
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
 }
Пример #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("0001", "html");
     id = Str2Str(q("id"));
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_emailgroup", btnSave);
     wh.AddBind(txtGroupName, "GroupName", true);
     if (id == "0")
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     else
     {
         wh.ConditionExpress = "id=" + id;
         wh.Mode             = JumboECMS.DBUtility.OperationType.Modify;
     }
     wh.BindBeforeAddOk    += new EventHandler(bind_ok);
     wh.BindBeforeModifyOk += new EventHandler(bind_ok);
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
     wh.validator = chkForm;
 }
Пример #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("link-mng", "stop");
     if (!Page.IsPostBack)
     {
         doh.Reset();
         doh.SqlCmd = "SELECT [ID],[Title] FROM [jcms_normal_linkclass] ORDER BY id asc";
         DataTable dtClass = doh.GetDataTable();
         for (int i = 0; i < dtClass.Rows.Count; i++)
         {
             this.ddlTypeId.Items.Add(new ListItem(dtClass.Rows[i]["Title"].ToString(), dtClass.Rows[i]["Id"].ToString()));
         }
         dtClass.Clear();
         dtClass.Dispose();
     }
     id = Str2Str(q("id"));
     doh.Reset();
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_link", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(txtUrl, "Url", true);
     wh.AddBind(txtImg, "ImgPath", true);
     wh.AddBind(txtInfo, "Info", true);
     wh.AddBind(txtOrderNum, "OrderNum", false);
     wh.AddBind(ddlTypeId, "TypeId", false);
     wh.AddBind(rblState, "SelectedValue", "State", false);
     wh.AddBind(rblStyle, "SelectedValue", "Style", false);
     if (id != "0")
     {
         wh.ConditionExpress = "id=" + id.ToString();
         wh.Mode             = JumboECMS.DBUtility.OperationType.Modify;
     }
     else
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
     wh.validator = chkForm;
 }
Пример #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("js-mng", "stop");
     id = Str2Str(q("id"));
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_javascript", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(txtCode, "Code", true);
     wh.AddBind(txtTemplateContent, "TemplateContent", true);
     if (id == "0")
     {
         this.txtCode.Text = GetRandomNumberString(64, false);
         wh.Mode           = JumboECMS.DBUtility.OperationType.Add;
     }
     else
     {
         this.txtCode.Enabled = false;
         wh.ConditionExpress  = "id=" + id;
         wh.Mode = JumboECMS.DBUtility.OperationType.Modify;
     }
     wh.validator = chkForm;
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
 }
Пример #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("master", "stop");
     id = Str2Str(q("id"));
     if (id == "0")
     {
         int _uID = new JumboECMS.DAL.Normal_UserDAL().Register("(admin)" + GetRandomNumberString(10), GetRandomNumberString(16), false, 0, GetRandomNumberString(12) + "@126.com", System.DateTime.Now.ToShortTimeString(), GetRandomNumberString(32), "", "");
         Response.Redirect("admin_add.aspx?id=" + _uID);
         Response.End();
     }
     else
     {
         JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_user", btnSave);
         wh.AddBind(lblUserName, "UserName", true);
         wh.AddBind(txtAdminName, "AdminName", true);
         wh.AddBind(rbtnAdminState, "SelectedValue", "AdminState", false);
         this.txtAdminName.ReadOnly = false;
         wh.ConditionExpress        = "id=" + id;
         wh.Mode      = JumboECMS.DBUtility.OperationType.Modify;
         wh.validator = chkForm;
         wh.ModifyOk += new EventHandler(save_ok);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     Admin_Load("9999", "html");
     id = Str2Str(q("id"));
     JumboECMS.DBUtility.WebFormHandler wh = new JumboECMS.DBUtility.WebFormHandler(doh, "jcms_normal_templateinclude", btnSave);
     wh.AddBind(txtTitle, "Title", true);
     wh.AddBind(txtSource, "Source", true);
     wh.AddBind(txtInfo, "Info", true);
     wh.AddBind(txtSort, "Sort", false);
     wh.AddBind(rblNeedBuild, "SelectedValue", "NeedBuild", false);
     if (id == "0")
     {
         wh.Mode = JumboECMS.DBUtility.OperationType.Add;
     }
     else
     {
         wh.ConditionExpress    = "id=" + id;
         this.txtSource.Enabled = false;
         wh.Mode = JumboECMS.DBUtility.OperationType.Modify;
     }
     wh.validator = chkForm;
     wh.AddOk    += new EventHandler(save_ok);
     wh.ModifyOk += new EventHandler(save_ok);
 }