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

            txtTitle.Text = model.title;
            rblDefaultView.SelectedValue = model.default_view.ToString();
            rblIsLock.SelectedValue      = model.is_lock.ToString();
            txtSortId.Text = model.sort_id.ToString();
        }
 //设置操作
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);
     BLL.online_service_group bll = new BLL.online_service_group();
     Model.online_service_group 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("", "sort_id asc,id desc");
 }
        private bool DoEdit(int _id)
        {
            bool result = true;

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

            model.title        = txtTitle.Text.Trim();
            model.default_view = int.Parse(rblDefaultView.SelectedValue);
            model.sort_id      = int.Parse(txtSortId.Text.Trim());
            model.is_lock      = int.Parse(rblIsLock.SelectedValue);

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

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

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

            model.title        = txtTitle.Text.Trim();
            model.default_view = int.Parse(rblDefaultView.SelectedValue);
            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);
        }
Example #5
0
        //设置操作
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value);

            BLL.online_service_group   bll   = new BLL.online_service_group();
            Model.online_service_group 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("", "sort_id asc,id desc");
        }
        private bool DoEdit(int _id)
        {
            bool result = true;
            BLL.online_service_group bll = new BLL.online_service_group();
            Model.online_service_group model = bll.GetModel(_id);

            model.title = txtTitle.Text.Trim();
            model.default_view = int.Parse(rblDefaultView.SelectedValue);
            model.sort_id = int.Parse(txtSortId.Text.Trim());
            model.is_lock = int.Parse(rblIsLock.SelectedValue);

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

            return result;
        }
        private void ShowInfo(int _id)
        {
            BLL.online_service_group bll = new BLL.online_service_group();
            Model.online_service_group model = bll.GetModel(_id);

            txtTitle.Text = model.title;
            rblDefaultView.SelectedValue = model.default_view.ToString();
            rblIsLock.SelectedValue = model.is_lock.ToString();
            txtSortId.Text = model.sort_id.ToString();
        }
Example #8
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.online_service_group bll = new BLL.online_service_group();
            Model.online_service_group model = bll.GetModel(_id);

            model.title = txtTitle.Text.Trim();
            model.default_view = int.Parse(rblDefaultView.SelectedValue);
            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;
        }