using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EKETEAM.Data;
using EKETEAM.FrameWork;
using EKETEAM.UserControl;
using LitJson;

public partial class Manage_StyleSelect : System.Web.UI.Page
{
    public string UserArea = "Manage";
    eUser user;
    protected void Page_Load(object sender, EventArgs e)
    {
        user = new eUser(eBase.getUserArea(UserArea));
        user.Check();

        string s1 = eParameters.QueryString("s1");
        string s2 = eParameters.QueryString("s2");

        string sql = "select * from a_eke_sysStyles where deltag=0";
        if (s1.Length > 0) sql += " and Name like '%" + s1 + "%'";
        if (s2.Length > 0) sql += " and StyleID like '%" + s2 + "%'";

        sql += " order by addtime desc";
        eBase.DataBase.getDataTable(sql, RepModels, ePageControl1);
    }
    public string getJsonObject(object row)
    {
        DataRowView dr = (DataRowView)row;

        JsonData json = new JsonData();
        json["viewHTML"] = dr["viewHTML"].ToString();
        json["HeaderTemplate"] = dr["HeaderTemplate"].ToString();
        json["ItemTemplate"] = dr["ItemTemplate"].ToString();
        json["FooterTemplate"] = dr["FooterTemplate"].ToString();

        return Base64.Encode(json.ToJson());
    }
}