Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.manager().Exists(this.id))
                {
                    JscriptMsg("記錄不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("manager_list", TWEnums.ActionEnum.View.ToString()); //檢查許可權
                Model.manager model = GetAdminInfo();             //取得管理員資料
                RoleBind(ddlRoleId, model.role_type);
                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                this.id     = TWRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.basic().Exists(this.id))
                {
                    JscriptMsg("資料不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                txtbasic_type.DataSource     = Tea.DBUtility.DbHelperSQL.Query("select * from shop_basic where basic_where='qu' order by basic_sort");
                txtbasic_type.DataTextField  = "basic_label";
                txtbasic_type.DataValueField = "basic_value";
                txtbasic_type.DataBind();
                //ChkAdminLevel("plugin_link", TWEnums.ActionEnum.View.ToString()); //檢查權限
                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                this.id     = TWRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.basic().Exists(this.id))
                {
                    JscriptMsg("資料不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("plugin_link", TWEnums.ActionEnum.View.ToString()); //檢查權限
                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            this.id = TWRequest.GetQueryInt("id");

            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.manager_role().Exists(this.id))
                {
                    JscriptMsg("角色不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("manager_role", TWEnums.ActionEnum.View.ToString()); //檢查許可權
                RoleTypeBind();                                   //綁定角色類型
                NavBind();                                        //綁定導航
                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id  = TWRequest.GetQueryInt("channel_id");
            this.category_id = TWRequest.GetQueryInt("category_id");
            this.keywords    = TWRequest.GetQueryString("keywords");
            this.property    = TWRequest.GetQueryString("property");
            this.goods_ids   = TWRequest.GetQueryString("goods_ids");

            if (channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back", "Error");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
            this.pageSize     = GetPageSize(50);                                   //每頁數量
            if (!Page.IsPostBack)
            {
                ////ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.View.ToString()); //檢查權限
                TreeBind(this.channel_id); //綁定類別
                if (!string.IsNullOrEmpty(goods_ids))
                {
                    RptBind(this.channel_id, this.category_id, "id not in(" + goods_ids + ") and brand_id in(1,2,3,5) and yu_lock<1" + CombSqlTxt(this.keywords, this.property), "id desc");
                }
                else
                {
                    RptBind(this.channel_id, this.category_id, "brand_id in(1,2,3,5) and yu_lock<1" + CombSqlTxt(this.keywords, this.property), "id desc");
                }
            }
        }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ChkAdminLevelEdit("user_list", "Edit");
        this.channel_id  = TWRequest.GetQueryInt("channel_id");
        this.category_id = TWRequest.GetQueryInt("category_id");
        this.keywords    = TWRequest.GetQueryString("keywords");
        this.property    = TWRequest.GetQueryString("property");
        this.goods_ids   = TWRequest.GetQueryString("goods_ids");

        if (channel_id == 0)
        {
            JscriptMsg("頻道參數不正確!", "back", "Error");
            return;
        }
        this.channel_name = new Tea.BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
        this.pageSize     = GetPageSize(50);                                       //每頁數量
        if (!Page.IsPostBack)
        {
            TreeBind(this.channel_id); //綁定類別
            if (!string.IsNullOrEmpty(goods_ids))
            {
                RptBind(this.channel_id, this.category_id, "wheresql='tuan' and brand_id=1" + CombSqlTxt(this.keywords, this.property), "id desc");
            }
            else
            {
                RptBind(this.channel_id, this.category_id, "wheresql='tuan' and brand_id=1" + CombSqlTxt(this.keywords, this.property), "id desc");
            }
        }
    }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id  = TWRequest.GetQueryInt("channel_id", 1);
            this.category_id = TWRequest.GetQueryInt("category_id");
            this.keywords    = TWRequest.GetQueryString("keywords");
            this.property    = TWRequest.GetQueryString("property");
            this.status      = TWRequest.GetQueryString("status");

            if (channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back");
                return;
            }
            statusSelect.Visible = true;

            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
            this.pageSize     = GetPageSize(50);                                   //每頁數量
            this.prolistview  = Utils.GetCookie("vip_list_view");                  //顯示方式
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("channel_" + this.channel_name + "_list", TWEnums.ActionEnum.View.ToString()); //檢查權限
                TreeBind(this.channel_id); //綁定類別
                RptBind(this.channel_id, this.category_id, "id>0" + CombSqlTxt(this.keywords, this.property, this.status), "sort_id,add_time desc,id desc");
            }
        }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     msg = Utils.ToHtml(TWRequest.GetQueryString("msg"));
     if (string.IsNullOrEmpty(msg))
     {
         msg = "參數錯誤請返回!";
     }
 }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _users = new Tea.Web.UI.ShopPage().GetUserInfo();
        data_type.DataSource = Tea.DBUtility.DbHelperSQL.Query("select * from shop_article_category where channel_id=7 and call_index='1' order by sort_id desc");
        data_type.DataBind();

        key       = TWRequest.GetQueryString("key");
        this.page = TWRequest.GetQueryInt("page", 1);
        this.tid  = TWRequest.GetQueryInt("tid", 0);
        this.hid  = TWRequest.GetQueryInt("hid", 0);
        this.sort = TWRequest.GetQueryInt("sort", 0);


        if (sort == 1)
        {
            _orderby = "add_time desc,id desc";
        }
        if (sort == 2)
        {
            _orderby = "click desc";
        }
        if (sort == 3)
        {
            _orderby = "market_price,id";
        }
        if (sort == 4)
        {
            _orderby = "market_price desc,id";
        }
        if (tid != 0)
        {
            _sql  = _sql + " and (category_id=" + tid + " or more_type like'%," + tid + ",%')";
            tname = new Tea.BLL.article_category().GetTitle(tid);
            try
            {
                Tea.Model.article_category model = new Tea.BLL.article_category().GetModel(tid);
                title    = model.seo_title;
                keyword  = model.seo_keywords;
                describe = model.seo_description;
            }
            catch (Exception eee) { }
        }
        if (!string.IsNullOrEmpty(key))
        {
            _sql  = _sql + " and title like'%" + key + "%'";
            tname = key;
        }
        Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage();

        data_list.DataSource = bll_view.GetViewList("view_article_product", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount);
        data_list.DataBind();

        string pageUrl = Utils.CombUrlTxt("index.aspx", "tid={0}&key={1}&sort={2}&page={3}", tid.ToString(), key.ToString(), sort.ToString(), "__id__");

        PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     pwd = TWRequest.GetQueryString("pwd");
     id  = TWRequest.GetQueryInt("id");
     if (id != 0)
     {
         weburl = config.weburl;
         model  = bll.GetModel(id);
     }
 }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.keywords = TWRequest.GetQueryString("keywords");
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("manager_role", TWEnums.ActionEnum.View.ToString()); //檢查許可權
         Model.manager model = GetAdminInfo(); //取得當前管理員資訊
         RptBind("role_type>=" + model.role_type + CombSqlTxt(this.keywords));
     }
 }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        id = TWRequest.GetQueryString("id");
        string    uploadPath = "/users/orders.xls";
        string    filePath = Server.MapPath(uploadPath);
        string    fileExt = System.IO.Path.GetExtension(filePath);
        string    conn = "", conn1 = "";
        DataTable dt  = new DataTable();
        DataTable dt1 = new DataTable();

        if (fileExt == ".xls")
        {
            conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Extended Properties='Excel 8.0;IMEX=1'";
        }
        OleDbConnection  excelCon = new OleDbConnection(conn);
        OleDbDataAdapter odda     = new OleDbDataAdapter("SELECT * FROM [orders$] where OrderNumber='" + id + "'", excelCon);

        OleDbConnection  excelCon1 = new OleDbConnection(conn);
        OleDbDataAdapter odda1     = new OleDbDataAdapter("SELECT * FROM [orderslist$] where OrderNumber='" + id + "' and Num>0", excelCon1);

        try
        {
            odda.Fill(dt);
            data_list.DataSource = dt;
            data_list.DataBind();

            data_list1.DataSource = dt;
            data_list1.DataBind();
        }
        catch (Exception ex)
        {
        }
        finally
        {
            excelCon.Close();
            excelCon.Dispose();
        }

        try
        {
            odda1.Fill(dt1);

            data_cart.DataSource = dt1;
            data_cart.DataBind();
        }
        catch (Exception ex)
        {
        }
        finally
        {
            excelCon.Close();
            excelCon.Dispose();
        }
    }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = TWRequest.GetQueryString("keywords");
            this.begin    = TWRequest.GetQueryString("begin");
            this.end      = TWRequest.GetQueryString("end");

            if (!Page.IsPostBack)
            {
                RptBind();
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = TWRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(50); //每頁數量
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("plugin_link", TWEnums.ActionEnum.View.ToString()); //檢查權限
                RptBind("basic_where='help'" + CombSqlTxt(this.keywords), "basic_id asc");
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = TWRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每頁數量
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("goods_gift", TWEnums.ActionEnum.View.ToString()); //檢查權限
                RptBind("id>0" + CombSqlTxt(keywords), "sort_id desc,id desc");
            }
        }
Ejemplo n.º 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.keywords = TWRequest.GetQueryString("keywords");
     this.pageSize = GetPageSize(10); //每頁數量
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("manager_log", TWEnums.ActionEnum.View.ToString()); //檢查許可權
         model = GetAdminInfo(); //取得當前管理員資訊
         RptBind("id>0" + CombSqlTxt(keywords), "add_time desc,id desc");
     }
 }
Ejemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.keywords = TWRequest.GetQueryString("keywords");
     this.begin    = TWRequest.GetQueryString("begin");
     this.end      = TWRequest.GetQueryString("end");
     this.pageSize = GetPageSize(50); //每頁數量
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("order_list", TWEnums.ActionEnum.View.ToString()); //檢查權限
         RptBind("id>0" + CombSqlTxt(this.status, this.payment_status, this.express_status, this.keywords, data, begin, end, peisong), "id desc");
     }
 }
Ejemplo n.º 18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.keywords = TWRequest.GetQueryString("keywords");
     Status        = TWRequest.GetQueryInt("Status", -1);
     this.data     = TWRequest.GetQueryString("data");
     this.begin    = TWRequest.GetQueryString("begin");
     this.end      = TWRequest.GetQueryString("end");
     this.pageSize = GetPageSize(50); //每頁數量
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("plugin_feedback", TWEnums.ActionEnum.View.ToString()); //檢查權限
         RptBind("id>0" + CombSqlTxt(this.keywords, Status, data, begin, end), "add_time desc");
     }
 }
Ejemplo n.º 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     id   = TWRequest.GetQueryInt("id");
     code = TWRequest.GetQueryString("code");
     Tea.Model.users model = bll.GetModel(id);
     if (model.password != code)
     {
         Response.Write(ljd.function.LocalHint("郵箱驗證失敗,請重新驗證", "reg.aspx"));
     }
     else
     {
         model.status = 0;
         bll.Update(model);
     }
 }
Ejemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        key       = TWRequest.GetQueryString("key");
        this.page = TWRequest.GetQueryInt("page", 1);

        _sql = _sql + " and quan_where='zhe'";
        Tea.BLL.article bll = new Tea.BLL.article();

        Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage();

        data_list.DataSource = bll_view.GetViewList("shop_quan", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount);
        data_list.DataBind();

        string pageUrl = Utils.CombUrlTxt("quan.aspx", "key={0}&page={1}", key.ToString(), "__id__");

        PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                this.id     = TWRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.gift().Exists(this.id))
                {
                    JscriptMsg("記錄不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                for (int i = 1; i <= 12; i++)
                {
                    if (i < 10)
                    {
                        ddlMonth.Items.Add(new ListItem("0" + i.ToString(), "0" + i.ToString()));
                    }
                    else
                    {
                        ddlMonth.Items.Add(new ListItem(i.ToString(), i.ToString()));
                    }
                }
                int year = System.DateTime.Now.Year;
                for (int i = 2018; i <= year + 1; i++)
                {
                    ddlYear.Items.Add(new ListItem(i.ToString(), i.ToString()));
                }
                //ChkAdminLevel("goods_gift", TWEnums.ActionEnum.View.ToString()); //檢查權限


                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     order_no = TWRequest.GetQueryString("order_no");
     if (order_no == "")
     {
         JscriptMsg("傳輸參數不正確!", "back");
         return;
     }
     if (!new BLL.orders().Exists(order_no))
     {
         JscriptMsg("訂單不存在或已被刪除!", "back");
         return;
     }
     if (!Page.IsPostBack)
     {
         ShowInfo(order_no);
     }
 }
Ejemplo n.º 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            this.channel_id = TWRequest.GetQueryInt("channel_id");
            this.id         = TWRequest.GetQueryInt("id");

            if (this.channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
            if (!string.IsNullOrEmpty(_action) && _action == TWEnums.ActionEnum.Edit.ToString())
            {
                this.action = TWEnums.ActionEnum.Edit.ToString();//修改類型
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.article_category().Exists(this.id))
                {
                    JscriptMsg("類別不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("channel_" + this.channel_name + "_category", TWEnums.ActionEnum.View.ToString()); //檢查許可權
                TreeBind(this.channel_id);                        //綁定類別
                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    if (this.id > 0)
                    {
                        this.ddlParentId.SelectedValue = this.id.ToString();
                    }
                }
            }
        }
Ejemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        key       = TWRequest.GetQueryString("key");
        this.page = TWRequest.GetQueryInt("page", 1);
        this.tid  = TWRequest.GetQueryInt("tid", 0);
        this.sort = TWRequest.GetQueryInt("sort", 0);
        DataSet ds = new Tea.BLL.basic().GetList(0, "basic_where='news'", "basic_sort");

        data_news.DataSource = ds;
        data_news.DataBind();
        if (tid == 0)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                tid = Utils.StrToInt(ds.Tables[0].Rows[0]["basic_value"].ToString(), 0);
            }
        }
        if (sort == 1)
        {
            _orderby = "add_time desc,id desc";
        }
        if (sort == 2)
        {
            _orderby = "add_time,id";
        }
        if (tid != 0)
        {
            _sql = _sql + " and category_id=" + tid + "";
        }
        if (!string.IsNullOrEmpty(key))
        {
            _sql = _sql + " and title like'%" + key + "%'";
        }
        Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage();


        data_list.DataSource = bll_view.GetViewList("shop_about", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount);
        data_list.DataBind();

        string pageUrl = Utils.CombUrlTxt("news.aspx", "tid={0}&sort={1}&page={2}", sort.ToString(), "__id__");

        PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 25
0
        //頁面載入事件
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = TWRequest.GetQueryString("action");

            url = TWRequest.GetQueryString("url");
            if (this.channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱

            //如果是編輯或複製則檢查資料是否存在
            if (_action == TWEnums.ActionEnum.Edit.ToString() || _action == TWEnums.ActionEnum.Copy.ToString())
            {
                this.action = _action;//修改類型
                this.id     = TWRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("傳輸參數不正確!", "back");
                    return;
                }
                if (!new BLL.article().Exists(this.id))
                {
                    JscriptMsg("資訊不存在或已被刪除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                txtAddTime.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
                //ChkAdminLevel("channel_" + this.channel_name + "_list", TWEnums.ActionEnum.View.ToString()); //檢查許可權

                GroupBind("1=2");          //綁定用戶組
                TreeBind(this.channel_id); //綁定類別


                if (action == TWEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
Ejemplo n.º 26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     pwd = TWRequest.GetQueryString("pwd");
     id  = TWRequest.GetQueryInt("id");
     act = TWRequest.GetFormString("act");
     if (id > 0)
     {
         model = bll.GetModel(id);
         if (model.password != pwd)
         {
             Response.Write(ljd.function.LocalHint("該鏈接已經失效", "login.aspx"));
             Response.End();
         }
     }
     if (act == "act_edit")
     {
         model = bll.GetModel(id);
         //檢查輸入的舊密碼
         string oldpassword = TWRequest.GetFormString("txt_pwd");
         string password    = TWRequest.GetFormString("txt_pwd1");
         if (string.IsNullOrEmpty(oldpassword))
         {
             Response.Write(ljd.function.LocalHint("請輸入您的密碼!", ""));
             return;
         }
         //檢查輸入的新密碼
         if (string.IsNullOrEmpty(password))
         {
             Response.Write(ljd.function.LocalHint("請輸入確認密碼!", ""));
             return;
         }
         //舊密碼是否正確
         if (password != oldpassword)
         {
             Response.Write(ljd.function.LocalHint("對不起,您輸入的密碼不正確!", ""));
             return;
         }
         model.password = DESEncrypt.Encrypt(password, model.salt);
         bll.Update(model);
         Response.Write(ljd.function.LocalHint("重置密碼成功,請用新密碼登入", "login.aspx"));
         Response.End();
     }
 }
Ejemplo n.º 27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.channel_id  = TWRequest.GetQueryInt("channel_id");
     this.category_id = TWRequest.GetQueryInt("category_id");
     this.brand_id    = TWRequest.GetQueryInt("brand_id");
     this.keywords    = TWRequest.GetQueryString("keywords");
     this.property    = TWRequest.GetQueryString("property");
     this.sort        = TWRequest.GetQueryInt("sort");
     this.status      = TWRequest.GetQueryInt("status", -1);
     this.cid         = TWRequest.GetQueryInt("cid");
     if (channel_id == 0)
     {
         JscriptMsg("頻道參數不正確!", "back");
         return;
     }
     this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
     this.pageSize     = GetPageSize(10);                                   //每頁數量
     this.prolistview  = Utils.GetCookie("article_list_view");              //顯示方式
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("channel_" + this.channel_name + "_list", TWEnums.ActionEnum.View.ToString()); //檢查許可權
         TreeBind(this.channel_id);
         TreeBind1(77);//綁定類別
         BrandBind(this.channel_id);
         if (status < 0)
         {
             RptBind(this.channel_id, this.category_id, "wheresql='tuan'" + CombSqlTxt(this.keywords, this.property, this.brand_id, this.category_id), "sort_id desc,add_time desc,id desc");
         }
         else
         {
             ddlStatus.SelectedValue = status.ToString();
             if (status != 2)
             {
                 RptBind(this.channel_id, this.category_id, "wheresql='tuan' and status=" + status + "" + CombSqlTxt(this.keywords, this.property, this.brand_id, this.category_id), "sort_id desc,add_time desc,id desc");
             }
             else
             {
                 RptBind(this.channel_id, this.category_id, "wheresql='tuan' and status=0 and (datediff(day,xia_date,getdate())<=0 or xia_date is null) and datediff(minute,add_time,getdate())>=0" + CombSqlTxt(this.keywords, this.property, this.brand_id, this.category_id), "sort_id desc,add_time desc,id desc");
             }
         }
     }
 }
Ejemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.begin = TWRequest.GetQueryString("begin");
            this.end   = TWRequest.GetQueryString("end");
            if (!string.IsNullOrEmpty(begin) && !string.IsNullOrEmpty(end))
            {
                dt = System.DateTime.Parse(begin);
                DateTime dt1 = System.DateTime.Parse(begin);

                DateTime dt2 = System.DateTime.Parse(end);

                int Year = dt2.Year - dt1.Year;

                month = (dt2.Year - dt1.Year) * 12 + (dt2.Month - dt1.Month);
            }
            if (!IsPostBack)
            {
                RptBind();
            }
        }
Ejemplo n.º 29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        key       = TWRequest.GetQueryString("key");
        this.page = TWRequest.GetQueryInt("page", 1);

        _sql = "user_id=" + userModel.id + "";
        Tea.BLL.article bll = new Tea.BLL.article();

        if (!string.IsNullOrEmpty(key))
        {
            _sql = _sql + " and title like'%" + key + "%'";
        }
        Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage();

        data_list.DataSource = bll_view.GetViewList("view_order_point", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount);
        data_list.DataBind();
        show = data_list.Items.Count;
        string pageUrl = Utils.CombUrlTxt("pint.aspx", "key={0}&page={1}", key.ToString(), "__id__");

        PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
Ejemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id  = TWRequest.GetQueryInt("channel_id");
            this.category_id = TWRequest.GetQueryInt("category_id");
            this.keywords    = TWRequest.GetQueryString("keywords");
            this.goods_ids   = TWRequest.GetQueryString("goods_ids");

            if (channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back");
                return;
            }
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得頻道名稱
            this.pageSize     = GetPageSize(10);                                   //每頁數量
            if (!Page.IsPostBack)
            {
                //ChkAdminLevel("channel_" + this.channel_name + "_list", TWEnums.ActionEnum.View.ToString()); //檢查權限
                TreeBind(this.channel_id); //綁定類別
                RptBind(this.channel_id, this.category_id, "id not in(" + goods_ids + ") and wheresql='tuan' and brand_id=1" + CombSqlTxt(this.keywords, this.category_id), "id desc");
            }
        }