Example #1
0
        protected void btn_save_Click(object sender, EventArgs e)
        {
            if (txt_Name.Text.Trim().Length > 0)
            {
                using (MAction action = new MAction("TcFenlei"))
                {
                    action.UI.SetAutoPrefix("txt", "txt_", "ddl_");
                    action.Data.Set("types", types);
                    action.Data.Set("url", txt_Url.Text);

                    if (id > 0)
                    {
                        action.Update("id=" + id, true);
                    }
                    else
                    {
                        action.Insert(true);
                    }
                    LibCache.remove();
                    alert("保存成功", "list.aspx?types=" + types);
                }
            }
            else
            {
                alert("请输入名称!");
            }
        }
Example #2
0
        private void BindGridView()
        {
            gvqy.DataSource = BLL.TcZidian.Instance.GetList("types='" + types + "'").Tables[0].OrderBy("paixu");
            gvqy.DataBind();

            LibCache.remove(LibCache.tc_zidian);
        }
Example #3
0
        private void bind()
        {
            var where = "";

            var list = new List <string>()
            {
                "types='" + types + "'"
            };

            #region 设置条件

            var title = txt_title.Text.GetString().FilterSql();
            if (title.Length > 0)
            {
                list.Add("Name like '%" + title + "%'");
            }

            #endregion 设置条件

            where = string.Join(" and ", list);
            using (MAction action = new MAction("TcFenlei"))
            {
                action.Select(where + " order by paixu").Bind(this.rp_list);
            }
            LibCache.remove();
        }
Example #4
0
        private void bind()
        {
            var where = "types='" + types + "'";

            using (MAction action = new MAction("TcFenlei"))
            {
                action.Select(where + " order by paixu").Bind(this.rp_list);
            }
            LibCache.remove();
        }
Example #5
0
        private void BindGridView()
        {
            dt = LibFenlei.GetFenlei_dt("types='" + types + "'");
            gvqy.DataSource = LibFenlei.GetFenlei("types='" + types + "'");
            gvqy.DataBind();

            this.ddl_cate.SetDataSource(dt);
            this.ddl_cate.Items.Insert(0, "-请选择-");
            LibCache.remove(LibCache.tc_fenlei);
        }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     id    = Request.QueryString["id"].GetInt();
     types = Request.QueryString["types"].GetString();
     if (!IsPostBack)
     {
         ddl_fenleiid.SetDataSource(LibCache.get_fenlei_dt("types='" + types + "'"));
         ddl_fenleiid.Items.Insert(0, LibZidian.get_default_item());
         LoadData();
     }
 }
Example #7
0
        private void BindGridView()
        {
            gvqy.DataSource = BLL.GcConfig.Instance.GetList("types='" + types + "'").Tables[0];
            gvqy.DataBind();

            LibCache.remove(LibCache.tc_zidian);

            try
            {
                Cache.Remove("wangzhanpeizhilist");
            }
            catch (System.Exception ex)
            {
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            id = Request.QueryString["id"].GetInt();
            if (id == 0)
            {
                id = -MyID;
            }
            types = Request.QueryString["types"].GetString();
            if (!IsPostBack)
            {
                using (MAction action = new MAction("TcTupian"))
                {
                    action.Delete("fid=-" + MyID);
                }

                ddl_fenleiid.SetDataSource(LibCache.get_fenlei_dt("types='" + types + "'"));
                ddl_fenleiid.Items.Insert(0, LibZidian.get_default_item());

                LoadData();
            }
        }