예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == ActionEnum.Edit.ToString())
            {
                this.action = ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id < 1)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.advert_banner().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            else
            {
                this.aid = DTRequest.GetQueryInt("aid");
                if (this.aid < 1)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.advert().Exists(this.aid))
                {
                    JscriptMsg("广告位不存在或已删除!", "back", "Error");
                    return;
                }
                LitTitle.Text = new BLL.advert().GetTitle(aid);
            }
            if (!Page.IsPostBack)
            {
                if (action == ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
예제 #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            manager = GetAdminInfo();
            if (!this.isSearch)
            {
                this.page = DTRequest.GetQueryInt("page", 1);
            }
            else
            {
                this.page = 1;
            }
            BLL.finance bll = new BLL.finance();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, manager, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = backUrl();

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);

            txtOrder.Text              = _ordernum;
            txtCusName.Text            = _cusname;
            hCusId.Value               = _cusid;
            ddlcheck.SelectedValue     = _status;
            txtsDate.Text              = _smonth;
            txteDate.Text              = _emonth;
            txtOsdate.Text             = _sdate;
            txtOedate.Text             = _edate;
            ddlsign.SelectedValue      = _sign;
            txtMoney.Text              = _money;
            ddlnature.SelectedValue    = _nid;
            txtDetails.Text            = _detail;
            ddlstatus.SelectedValue    = _ostatus;
            ddllock.SelectedValue      = _lock;
            ddlarea.SelectedValue      = _area;
            txtPerson1.Text            = _person1;
            txtPerson3.Text            = _person3;
            txtPerson5.Text            = _person5;
            ddlorderarea.SelectedValue = _orderarea;
            ddlfinarea.SelectedValue   = _finarea;
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back", "Error");
                    return;
                }
                if (!new BLL.carbll().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back", "Error");
                    return;
                }
            }
            admin_info = GetAdminInfo();
            if (!Page.IsPostBack)
            {
                car_typebll cartypebll = new car_typebll();
                DataTable   tb         = cartypebll.GetList(1000, " 1=1 ", " id").Tables[0];
                this.ddlCar_Type.Items.Clear();
                foreach (DataRow dr in tb.Rows)
                {
                    this.ddlCar_Type.Items.Add(new ListItem(dr["Type_Name"].ToString(), dr["Type_Code"].ToString()));
                }
                car_driverbll cardriverbll = new car_driverbll();
                DataTable     tbdriver     = cardriverbll.GetList(1000, " 1=1 ", " id").Tables[0];
                this.ddlDriver.Items.Clear();
                foreach (DataRow dr in tbdriver.Rows)
                {
                    this.ddlDriver.Items.Add(new ListItem(dr["Driver_Name"].ToString(), dr["Driver_Code"].ToString()));
                }
                if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
            }
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.type_id  = DTRequest.GetQueryInt("type_id");
            this.keywords = DTRequest.GetQueryString("keywords");
            string Url = Request.Url.ToString();

            if (string.IsNullOrEmpty(Utils.GetCookie("UserCheckPwd")))
            {
                if (string.IsNullOrEmpty(DTRequest.GetQueryString("State")))
                {
                    Response.Redirect("RePw.aspx?Url=" + Url + "");
                }
            }
            this.pageSize = GetPageSize(15); //每頁數量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("user_message", DTEnums.ActionEnum.View.ToString()); //檢查許可權
                RptBind("id>0" + CombSqlTxt(this.type_id, this.keywords), "post_time desc,id desc");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            UserGroud = DTRequest.GetQueryInt("UserGroud");

            pageSize = GetPageSize(GetType().Name + "_page_size"); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("manage_bank_transaction_charge", DTEnums.ActionEnum.View.ToString()); //检查权限
                var status = DTRequest.GetQueryString("status");
                if (!string.IsNullOrEmpty(status))
                {
                    rblBankTransactionStatus.SelectedValue = status;
                }
                txtKeywords.Text  = DTRequest.GetQueryString("keywords");
                txtStartTime.Text = DTRequest.GetQueryString("startTime");
                txtEndTime.Text   = DTRequest.GetQueryString("endTime");
                TreeBind();
                RptBind();
            }
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.category_id = DTRequest.GetQueryInt("category_id");
            //this.keywords = DTRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("site_channel_list", DTEnums.ActionEnum.View.ToString()); //检查权限

                var keywords = DTRequest.GetQueryString("keywords");
                if (!string.IsNullOrEmpty(keywords))
                {
                    txtKeywords.Text = keywords;
                }

                TreeBind(); //绑定类别
                RptBind("id>0" + CombSqlTxt(category_id, txtKeywords.Text), "sort_id asc,id desc");
            }
        }
예제 #7
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.group_id > 0)
            {
                this.ddlGroupId.SelectedValue = this.group_id.ToString();
            }
            this.txtKeywords.Text = this.keywords;
            BLL.users bll = new BLL.users();
            this.rptList.DataSource = bll.list_pagesWhere(this.page, this.pageSize, " and group_id=5 and " + _strWhere, _orderby);
            this.totalCount         = bll.GetTatalNum(_strWhere + " and group_id=5");
            this.rptList.DataBind();

            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("shop_list.aspx", "group_id={0}&keywords={1}&page={2}",
                                              this.group_id.ToString(), this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #8
0
        private void RptBind(string _strWhere, string _orderby)
        {
            int UserID = 0;

            this.page = DTRequest.GetQueryInt("page", 1);
            if (!string.IsNullOrEmpty(Request.QueryString["uID"]))
            {
                UserID = DTRequest.GetQueryInt("uID");
            }
            BLL.point_log bll = new BLL.point_log();
            this.rptList.DataSource = bll.list_pagesWhere(this.page, this.pageSize, " and user_id=" + UserID + " and " + _strWhere, " order by " + _orderby);
            this.rptList.DataBind();
            this.totalCount = bll.GetTatalNum("  user_id=" + UserID + " and " + _strWhere);
            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("point_log.aspx", "keywords={0}&page={1}",
                                              this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     action = DTRequest.GetQueryString("action");
     id     = DTRequest.GetQueryInt("id");
     if (!Page.IsPostBack)
     {
         //ChkAdminLevel("app_list", DTEnums.ActionEnum.View.ToString()); //检查权限
         if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
         {
             ShowInfo(this.id);
         }
         else
         {
             //if (string.IsNullOrEmpty(txttoken_value.Text))
             //{
             //    txttoken_value.Text = this.CreateKey(8);
             //}
         }
     }
 }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id   = DTRequest.GetQueryInt("channel_id");
            this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
            this.property     = DTRequest.GetQueryString("property");
            this.keywords     = DTRequest.GetQueryString("keywords");

            if (channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channel_name + "_comment", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("channel_id=" + this.channel_id + CombSqlTxt(this.keywords, this.property), "add_time desc");
            }
        }
예제 #11
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.category_id > 0)
            {
                this.ddlCategoryId.SelectedValue = this.category_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;
            BLL.article bll = new BLL.article();
            this.rptList.DataSource = bll.GetContentList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //綁定頁碼
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
                                              this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #12
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            BLL.Customer bll = new BLL.Customer();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, manager, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = backUrl();

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);

            txtCusName.Text         = _cusName;
            hCusId.Value            = _cid;
            ddlcheck1.SelectedValue = _check1;
            ddltype.SelectedValue   = _type;
            ddlisUse.SelectedValue  = _isUse;
            txtOwner1.Text          = _owner1;
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.channel_id  = DTRequest.GetQueryInt("channel_id");
            this.category_id = DTRequest.GetQueryInt("category_id");
            this.keywords    = DTRequest.GetQueryString("keywords");
            this.property    = DTRequest.GetQueryString("property");

            if (this.channel_id == 0)
            {
                JscriptMsg("頻道參數不正確!", "back", "Error");
                return;
            }
            this.pageSize = GetPageSize(15); //每頁數量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel(channel_id, DTEnums.ActionEnum.View.ToString()); //檢查許可權
                TreeBind(this.channel_id);                                     //綁定類別
                RptBind("id>0" + CombSqlTxt(this.channel_id, this.category_id, this.keywords, this.property), "sort_id asc,add_time desc");
            }
        }
예제 #14
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            BLL.daikuan_repay bll = new BLL.daikuan_repay();
            var list = bll.GetList("daikuan_id=" + this.id);

            rptList.DataSource = list;
            rptList.DataBind();

            var albumsList = new List <Model.daikuan_repay_albums>();
            var dt         = list.Tables[0];

            foreach (DataRow item in dt.Rows)
            {
                var model = bll.GetModel(Utils.StrToInt(item["id"].ToString(), 0));
                albumsList.AddRange(model.albums);
            }
            this.rptList2.DataSource = albumsList;
            this.rptList2.DataBind();
        }
예제 #15
0
        private void RptBind(string _strWhere, string _orderby)
        {
            if (!this.isSearch)
            {
                this.page = DTRequest.GetQueryInt("page", 1);
            }
            else
            {
                this.page = 1;
            }
            BLL.finance bll = new BLL.finance();
            this.rptList.DataSource = bll.GetList1(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("selfFinance_list.aspx", "page={0}&ddltype={1}&txtOrder={2}&txtCusName={3}&hCusId={4}&ddlcheck={5}&txtsDate={6}&txteDate={7}", "__id__", _type, _ordernum, _cusname, _cusid, _status, _smonth, _emonth);

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #16
0
        private void RptBind(string _strWhere, string _orderby)
        {
            if (!this.isSearch)
            {
                this.page = DTRequest.GetQueryInt("page", 1);
            }
            else
            {
                this.page = 1;
            }
            BLL.customerBank bll = new BLL.customerBank();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("bank_list.aspx", "page={0}&txtCusName={1}&hCusId={2}&ddlisUse={3}", "__id__", _cusName, _cid, _isUse);

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #17
0
 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     action = DTRequest.GetQueryString("action");
     id     = DTRequest.GetQueryInt("id");
     if (action.ToLower() == DTEnums.ActionEnum.Edit.ToString().ToLower())
     {
         BLL.user_addr_book bll = new BLL.user_addr_book();
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(linkurl("error", "?msg=" + Utils.UrlEncode("出错了,您要浏览的页面不存在或已删除!")));
             return;
         }
         model = bll.GetModel(id);
         if (model.user_id != userModel.id)
         {
             HttpContext.Current.Response.Redirect(linkurl("error", "error.aspx?msg=" + Utils.UrlEncode("出错了,您所要修改的并非自己的地址!")));
             return;
         }
     }
 }
예제 #18
0
        private void RptBind(int _board_id, string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.board_id > 0)
            {
                this.ddlCategoryId.SelectedValue = _board_id.ToString();
            }
            this.ddlProperty.SelectedValue = this.property;
            this.txtKeywords.Text          = this.keywords;

            BLL.forum_posts bll = new BLL.forum_posts();
            this.rptList1.DataSource = bll.GetList(_board_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList1.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("post_list.aspx", "board_id={0}&keywords={1}&property={2}&page={3}", _board_id.ToString(), this.keywords, this.property, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #19
0
        protected int online; //在线状态

        protected void Page_Load(object sender, EventArgs e)
        {
            this.keywords = DTRequest.GetQueryString("keywords");
            this.state    = DTRequest.GetQueryInt("state", -1);
            this.online   = DTRequest.GetQueryInt("online", -1);

            this.pageSize = GetPageSize(10); //每页数量
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("warning_list", DTEnums.ActionEnum.View.ToString()); //检查权限

                Model.manager model  = GetAdminInfo();                             //取得当前管理员信息
                string        _where = "";
                if (model.role_type != 1)
                {
                    _where = $" and i.user_id={model.id} ";
                }
                RptBind(" 1=1 " + _where + CombSqlTxt(keywords, this.state, this.online), " i.id desc");
            }
        }
예제 #20
0
 /// <summary>
 /// 重写虚方法,此方法在Init事件执行
 /// </summary>
 protected override void InitPage()
 {
     action = DTRequest.GetQueryString("action");
     id     = DTRequest.GetQueryInt("id");
     if (action.ToLower() == DTEnums.ActionEnum.Edit.ToString().ToLower())
     {
         BLL.user_addr_book bll = new BLL.user_addr_book();
         if (!bll.Exists(id))
         {
             HttpContext.Current.Response.Redirect(linkurl("error"));
             return;
         }
         model = bll.GetModel(id);
         if (model.user_id != userModel.id)
         {
             HttpContext.Current.Response.Redirect(linkurl("error"));
             return;
         }
     }
 }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.CategoryId    = DTRequest.GetQueryInt("category_id");
            this.ProjectStatus = DTRequest.GetQueryInt("project_status");
            this.Keywords      = DTRequest.GetQueryString("keywords");

            projectChannelId = context.dt_channel.Single(ch => ch.name == "project").id;

            CategoryIdTitleMap = context.dt_article_category.Where(c => c.channel_id == projectChannelId).OrderBy(c => c.sort_id).ToDictionary(c => c.id, c => c.title);
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("project-publish-announce", DTEnums.ActionEnum.View.ToString());
                if (!string.IsNullOrEmpty(Keywords))
                {
                    txtKeywords.Text = Keywords;
                }
                TreeBind();
                RptBind();
            }
        }
예제 #22
0
        public void ProcessRequest(HttpContext context)
        {
            //取得处事类型
            int uid  = DTRequest.GetQueryInt("uid", 0);
            int size = DTRequest.GetQueryInt("size", 50);

            DTcms.Model.users userModel = new DTcms.BLL.users().GetModel(uid);

            string _avatar = "/plugins/forum/templet/Default/Images/avatar_none_" + size + ".jpg";

            if (userModel != null)
            {
                if (!string.IsNullOrEmpty(userModel.avatar))
                {
                    _avatar = userModel.avatar;
                }
            }

            context.Response.Redirect(_avatar);
        }
예제 #23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.id = DTRequest.GetQueryInt("id");
     if (id == 0)
     {
         JscriptMsg("传输参数不正确!", "back");
         return;
     }
     if (!new BLL.article_comment().Exists(this.id))
     {
         JscriptMsg("记录不存在或已删除!", "back");
         return;
     }
     this.model        = new BLL.article_comment().GetModel(this.id);             //取得评论实体
     this.channel_name = new BLL.site_channel().GetChannelName(model.channel_id); //取得频道名称
     if (!Page.IsPostBack)
     {
         ShowInfo();
     }
 }
예제 #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.aid      = DTRequest.GetQueryInt("aid");
     this.keywords = DTRequest.GetQueryString("keywords");
     if (this.aid < 1)
     {
         JscriptMsg("传输参数不正确!", "back", "Error");
         return;
     }
     if (!new BLL.advert().Exists(this.aid))
     {
         JscriptMsg("广告位不存在或已删除!", "back", "Error");
         return;
     }
     LitTitle.Text = new BLL.advert().GetTitle(aid);
     if (!Page.IsPostBack)
     {
         RptBind("aid=" + this.aid + CombSqlTxt(this.keywords), "is_lock asc,sort_id asc,add_time desc");
     }
 }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.group_id = DTRequest.GetQueryInt("group_id");
            this.keywords = DTRequest.GetQueryString("keywords");

            this.pageSize = GetPageSize(15); //每页数量
            admin_info    = GetAdminInfo();

            if (!Page.IsPostBack)
            {
                ChkAdminLevel("users", DTEnums.ActionEnum.View.ToString()); //检查权限
                RptBind("id>0" + CombSqlTxt(this.keywords), "id desc");
            }

            string straction = "";

            if (Request.QueryString == null || Request.QueryString.Keys.Count <= 0 || Request.QueryString["action"] == null)
            {
            }
            else
            {
                straction = Request.QueryString["action"].ToString();
            }
            if (Request.Form == null || Request.Form.Keys.Count <= 0 || Request.Form["action"] == null)
            {
            }
            else
            {
                if (straction.Trim() == "")
                {
                    straction = Request.Form["action"].ToString();
                }
            }
            if (straction == "")
            {
            }
            else if (straction == "AfterStatus")
            {
                AfterStatus();
            }
        }
예제 #26
0
        //页面加载事件
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (this.channel_id == 0)
            {
                JscriptMsg("频道参数不正确!", "back");
                return;
            }
            this.channelModel = new BLL.site_channel().GetModel(this.channel_id); //取得频道实体

            this.IsCmForumInputPeople = GetIsCmForumInputPeople(channel_id);

            //如果是编辑或复制则检查信息是否存在
            if (_action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = _action;//修改或复制类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.article().Exists(this.channel_id, this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("channel_" + this.channelModel.name + "_list", DTEnums.ActionEnum.View.ToString()); //检查权限
                ShowSysField(this.channel_id);                                                                    //显示相应的默认控件
                GroupBind(string.Empty);                                                                          //绑定用户组
                TreeBind(this.channel_id);                                                                        //绑定类别
                if (action == DTEnums.ActionEnum.Edit.ToString() || action == DTEnums.ActionEnum.Copy.ToString()) //修改
                {
                    ShowInfo(this.channel_id, this.id);
                }
            }
        }
예제 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            if (!string.IsNullOrEmpty(_action) && _action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = DTEnums.ActionEnum.Edit.ToString();//修改类型
                this.id     = DTRequest.GetQueryInt("id");
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.channel().Exists(this.id))
                {
                    JscriptMsg("记录不存在或已删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                ChkAdminLevel("sys_channel_manage", DTEnums.ActionEnum.View.ToString()); //检查权限

                //添加、编辑权限
                if (!ChkAuthority("sys_channel_manage", this.action))
                {
                    this.btnSubmit.Visible = false;
                }

                TreeBind();                                       //绑定类别
                FieldBind();                                      //绑定扩展字段
                if (action == DTEnums.ActionEnum.Edit.ToString()) //修改
                {
                    ShowInfo(this.id);
                }
                else
                {
                    txtName.Attributes.Add("ajaxurl", "../../tools/admin_ajax.ashx?action=channel_name_validate");
                }
            }
        }
예제 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //问题关于这个地方参数0 "" " "是怎么处理的呢? 如果参数是几个的话
            this.id = DTRequest.GetQueryInt("id");

            this.WebStatusID = DTRequest.GetQueryInt("WebStatusID");
            this.PartnerID   = DTRequest.GetQueryInt("PartnerID");
            this.BrandsID    = DTRequest.GetQueryInt("BrandsID");
            //中文传参数问题
            this.WebSiteType = HttpContext.Current.Server.UrlDecode(DTRequest.GetString("WebSiteType"));

            this.keywords = DTRequest.GetQueryString("keywords");
            this.property = DTRequest.GetQueryString("property");

            //if (this.id == 0)
            //{
            //    JscriptMsg("网站参数不正确!", "back", "Error");
            //    return;
            //}
            //else
            //{

            //每页数量
            this.pageSize = GetPageSize(14);

            if (!Page.IsPostBack)
            {
                WebStatusBind(); PartnerBind(); BrandsBind(); WebSiteTypeBind();

                //组合查询条件
                string strCondition = " WebSiteID>0 " + CombSqlTxt(this.WebStatusID, this.PartnerID, this.BrandsID, this.keywords, this.property, this.WebSiteType);

                //System.Diagnostics.Stopwatch st = new System.Diagnostics.Stopwatch();
                //st.Start();
                RptBind(this.id, strCondition, strPaixu);
                //st.Stop();

                //Response.Write(st.ElapsedMilliseconds.ToString());
            }
            //}
        }
예제 #29
0
        public void ProcessRequest(HttpContext context)
        {
            int id = DTRequest.GetQueryInt("id");

            //获得广告位的ID
            if (id < 1)
            {
                context.Response.Write("{\"status\": 0, \"msg\":\"参数错误!\"}");
                return;
            }
            //检查广告位是否存在
            BLL.advert abll = new BLL.advert();
            if (!abll.Exists(id))
            {
                context.Response.Write("{\"status\": 0, \"msg\":\"该广告位不存在!\"}");
                return;
            }
            //取得该广告位详细信息
            Model.advert model = abll.GetModel(id);
            //输出该广告位下的广告条,不显示未开始、过期、暂停广告
            BLL.advert_banner bbll = new BLL.advert_banner();
            DataSet           ds   = bbll.GetList(0, "is_lock=0 and datediff(d,start_time,getdate())>=0 and datediff(d,end_time,getdate())<=0 and aid=" + id, "sort_id asc,id desc");

            if (ds.Tables[0].Rows.Count < 1)
            {
                context.Response.Write("{\"status\": 0, \"msg\":\"该广告位下暂无广告内容或者已过期!\"}");
                return;
            }
            //新增,取得站点配置信息
            DTcms.Model.siteconfig siteConfig = new DTcms.BLL.siteconfig().loadConfig();
            //输出Json
            JsonHelper.WriteJson(context, new
            {
                title  = model.title,
                type   = model.type.ToString(),
                number = model.view_num.ToString(),
                width  = model.view_width.ToString(),
                height = model.view_height.ToString(),
                list   = ds.Tables[0]
            });
        }
예제 #30
0
        //页面加载事件
        protected void Page_Load(object sender, EventArgs e)
        {
            string _action = DTRequest.GetQueryString("action");

            this.id = DTRequest.GetQueryInt("id");
            Model.manager model = GetAdminInfo();
            if (model.role_id == 1)
            {
                btnCancel.Visible = true;
            }
            else
            {
                btnCancel.Visible = false;
            }
            //如果是编辑或复制则检查信息是否存在
            if (_action == DTEnums.ActionEnum.Edit.ToString())
            {
                this.action = _action;//修改类型
                if (this.id == 0)
                {
                    JscriptMsg("传输参数不正确!", "back");
                    return;
                }
                if (!new BLL.teacher().Exists(this.id))
                {
                    JscriptMsg("信息不存在或已被删除!", "back");
                    return;
                }
            }
            if (!Page.IsPostBack)
            {
                BLL.teacher bll      = new BLL.teacher();
                var         students = bll.GetStudentIds(this.id);
                var         strWhere = "";
                if (!string.IsNullOrEmpty(students))
                {
                    strWhere = "and id not in(select * from dbo.f_split((select students from dt_teacher where id=" + this.id + "),','))";
                }
                RptBind("id>0 and teacher_id=" + this.id + strWhere, "name asc");
            }
        }