Exemple #1
0
        private void ShowInfo(int _id)
        {
            BLL.online_service   bll   = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            ddlGroupId.SelectedValue = model.group_id.ToString();
            txtTitle.Text            = model.title;
            rblIsLock.SelectedValue  = model.is_lock.ToString();
            txtSortId.Text           = model.sort_id.ToString();
            txtLinkUrl.Text          = model.link_url;
            txtImgUrl.Text           = model.img_url;
        }
Exemple #2
0
        //设置操作
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);

            BLL.online_service   bll   = new BLL.online_service();
            Model.online_service model = bll.GetModel(id);
            switch (e.CommandName.ToLower())
            {
            case "ibtnlock":
                if (model.is_lock == 1)
                {
                    bll.UpdateField(id, "is_lock=0");
                }
                else
                {
                    bll.UpdateField(id, "is_lock=1");
                }
                break;
            }
            this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc");
        }
        private bool DoEdit(int _id)
        {
            bool result = true;

            BLL.online_service   bll   = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            model.group_id = int.Parse(ddlGroupId.SelectedValue);
            model.title    = txtTitle.Text.Trim();
            model.img_url  = txtImgUrl.Text.Trim();
            model.link_url = txtLinkUrl.Text.Trim();
            model.sort_id  = int.Parse(txtSortId.Text.Trim());
            model.is_lock  = int.Parse(rblIsLock.SelectedValue);

            if (!bll.Update(model))
            {
                result = false;
            }

            return(result);
        }
Exemple #4
0
        private bool DoEdit(int _id)
        {
            bool result = false;

            BLL.online_service   bll   = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            model.group_id = int.Parse(ddlGroupId.SelectedValue);
            model.title    = txtTitle.Text.Trim();
            model.img_url  = txtImgUrl.Text.Trim();
            model.link_url = txtLinkUrl.Text.Trim();
            model.sort_id  = int.Parse(txtSortId.Text.Trim());
            model.is_lock  = int.Parse(rblIsLock.SelectedValue);

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改在线客服:" + model.title); //记录日志
                result = true;
            }

            return(result);
        }
Exemple #5
0
        private void ShowInfo(int _id)
        {
            BLL.online_service bll = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            ddlGroupId.SelectedValue = model.group_id.ToString();
            txtTitle.Text = model.title;
            rblIsLock.SelectedValue = model.is_lock.ToString();
            txtSortId.Text = model.sort_id.ToString();
            txtLinkUrl.Text = model.link_url;
            txtImgUrl.Text = model.img_url;
        }
Exemple #6
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.online_service bll = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            model.group_id = int.Parse(ddlGroupId.SelectedValue);
            model.title = txtTitle.Text.Trim();
            model.img_url = txtImgUrl.Text.Trim();
            model.link_url = txtLinkUrl.Text.Trim();
            model.sort_id = int.Parse(txtSortId.Text.Trim());
            model.is_lock = int.Parse(rblIsLock.SelectedValue);

            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改在线客服:" + model.title); //记录日志
                result = true;
            }

            return result;
        }
 //设置操作
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);
     BLL.online_service bll = new BLL.online_service();
     Model.online_service model = bll.GetModel(id);
     switch (e.CommandName.ToLower())
     {
         case "ibtnlock":
             if (model.is_lock == 1)
                 bll.UpdateField(id, "is_lock=0");
             else
                 bll.UpdateField(id, "is_lock=1");
             break;
     }
     this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc");
 }
        private bool DoEdit(int _id)
        {
            bool result = true;
            BLL.online_service bll = new BLL.online_service();
            Model.online_service model = bll.GetModel(_id);

            model.group_id = int.Parse(ddlGroupId.SelectedValue);
            model.title = txtTitle.Text.Trim();
            model.img_url = txtImgUrl.Text.Trim();
            model.link_url = txtLinkUrl.Text.Trim();
            model.sort_id = int.Parse(txtSortId.Text.Trim());
            model.is_lock = int.Parse(rblIsLock.SelectedValue);

            if (!bll.Update(model))
            {
                result = false;
            }

            return result;
        }