Example #1
0
        private bool DoAdd()
        {
            RTBcms.Web.Plugin.OnlineService.Model.online_service online_service  = new RTBcms.Web.Plugin.OnlineService.Model.online_service();
            RTBcms.Web.Plugin.OnlineService.BLL.online_service   online_service2 = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
            online_service.site_path        = this.ddlSitePath.SelectedValue;
            online_service.service_template = this.txtService_template.Text.Trim();
            online_service.service_title    = this.txtService_title.Text.Trim();
            online_service.sort_id          = Utils.StrToInt(this.txtSortId.Text.Trim(), 99);
            if (this.cbIsLock.Checked)
            {
                online_service.is_lock = 1;
            }
            else
            {
                online_service.is_lock = 0;
            }
            bool result;

            if (online_service2.Add(online_service) > 0)
            {
                CacheHelper.Remove("dt_cache_http_domain");
                base.AddAdminLog(3.ToString(), "添加在线客服:" + online_service.service_template);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Example #2
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            RTBcms.Web.Plugin.OnlineService.BLL.online_service   online_service = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
            RTBcms.Web.Plugin.OnlineService.Model.online_service model          = online_service.GetModel(_id);
            model.site_path        = this.ddlSitePath.SelectedValue;
            model.service_template = this.txtService_template.Text.Trim();
            model.service_title    = this.txtService_title.Text.Trim();
            model.sort_id          = Utils.StrToInt(this.txtSortId.Text.Trim(), 99);
            if (this.cbIsLock.Checked)
            {
                model.is_lock = 1;
            }
            else
            {
                model.is_lock = 0;
            }
            if (online_service.Update(model))
            {
                CacheHelper.Remove("dt_cache_http_domain");
                base.AddAdminLog(4.ToString(), "修改在线客服:" + model.service_template);
                result = true;
            }
            return(result);
        }
Example #3
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            RTBcms.Web.Plugin.OnlineService.BLL.online_service online_service = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
            this.rptList.DataSource = online_service.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount);
            this.rptList.DataBind();
            this.txtPageNum.Text = this.pageSize.ToString();
            string text = Utils.CombUrlTxt("online_service_list.aspx", "keywords={0}&page={1}", new string[]
            {
                this.keywords,
                "__id__"
            });

            this.PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, text, 8);
        }
Example #4
0
 private void ShowInfo(int _id)
 {
     RTBcms.Web.Plugin.OnlineService.BLL.online_service   online_service = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
     RTBcms.Web.Plugin.OnlineService.Model.online_service model          = online_service.GetModel(_id);
     this.ddlSitePath.SelectedValue = model.site_path;
     this.txtService_template.Text  = model.service_template;
     this.txtService_title.Text     = model.service_title;
     this.txtSortId.Text            = model.sort_id.ToString();
     if (model.is_lock == 1)
     {
         this.cbIsLock.Checked = true;
     }
     else
     {
         this.cbIsLock.Checked = false;
     }
 }
Example #5
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     RTBcms.Web.Plugin.OnlineService.BLL.online_service online_service = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
     for (int i = 0; i < this.rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)this.rptList.Items[i].FindControl("hidId")).Value);
         int num;
         if (!int.TryParse(((TextBox)this.rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out num))
         {
             num = 99;
         }
         online_service.UpdateField(id, "sort_id=" + num.ToString());
     }
     base.AddAdminLog(4.ToString(), "保存客服排序");
     base.JscriptMsg("保存排序成功!", Utils.CombUrlTxt("online_service_list.aspx", "keywords={0}", new string[]
     {
         this.keywords
     }));
 }
Example #6
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int num  = 0;
            int num2 = 0;

            RTBcms.Web.Plugin.OnlineService.BLL.online_service online_service = new RTBcms.Web.Plugin.OnlineService.BLL.online_service();
            for (int i = 0; i < this.rptList.Items.Count; i++)
            {
                int      id       = Convert.ToInt32(((HiddenField)this.rptList.Items[i].FindControl("hidId")).Value);
                CheckBox checkBox = (CheckBox)this.rptList.Items[i].FindControl("chkId");
                if (checkBox.Checked)
                {
                    if (online_service.Delete(id))
                    {
                        num++;
                    }
                    else
                    {
                        num2++;
                    }
                }
            }
            base.AddAdminLog(5.ToString(), string.Concat(new object[]
            {
                "删除客服成功",
                num,
                "条,失败",
                num2,
                "条"
            }));
            base.JscriptMsg(string.Concat(new object[]
            {
                "删除成功",
                num,
                "条,失败",
                num2,
                "条!"
            }), Utils.CombUrlTxt("online_service_list.aspx", "keywords={0}", new string[]
            {
                this.keywords
            }));
        }