Пример #1
0
        private bool DoEdit(int _id)
        {
            bool result = false;

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

            model.title = txtTitle.Text.Trim();
            if (cbIsLock.Checked == true)
            {
                model.is_lock = 0;
            }
            else
            {
                model.is_lock = 1;
            }
            model.is_mobile = Utils.StrToInt(rblIsMobile.SelectedValue, 0);
            model.sort_id   = Utils.StrToInt(txtSortId.Text.Trim(), 99);
            model.api_path  = txtApiPath.Text.Trim();
            model.app_id    = txtAppId.Text.Trim();
            model.app_key   = txtAppKey.Text.Trim();
            model.img_url   = txtImgUrl.Text.Trim();
            model.remark    = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改OAuth信息:" + model.title); //记录日志
                result = true;
            }

            return(result);
        }
Пример #2
0
 private void ShowInfo(int _id)
 {
     BLL.user_oauth_app   bll   = new BLL.user_oauth_app();
     Model.user_oauth_app model = bll.GetModel(_id);
     txtTitle.Text = model.title;
     if (model.is_lock == 0)
     {
         cbIsLock.Checked = true;
     }
     else
     {
         cbIsLock.Checked = false;
     }
     txtSortId.Text  = model.sort_id.ToString();
     txtApiPath.Text = model.api_path;
     txtAppId.Text   = model.app_id;
     txtAppKey.Text  = model.app_key;
     txtImgUrl.Text  = model.img_url;
     txtRemark.Text  = model.remark;
 }
 private void ShowInfo(int _id)
 {
     BLL.user_oauth_app bll = new BLL.user_oauth_app();
     Model.user_oauth_app model = bll.GetModel(_id);
     txtTitle.Text = model.title;
     if (model.is_lock == 0)
     {
         cbIsLock.Checked = true;
     }
     else
     {
         cbIsLock.Checked = false;
     }
     txtSortId.Text = model.sort_id.ToString();
     txtApiPath.Text = model.api_path;
     txtAppId.Text = model.app_id;
     txtAppKey.Text = model.app_key;
     txtImgUrl.Text = model.img_url;
     txtRemark.Text = model.remark;
 }
Пример #4
0
        private bool DoEdit(int _id)
        {
            bool result = false;
            BLL.user_oauth_app bll = new BLL.user_oauth_app();
            Model.user_oauth_app model = bll.GetModel(_id);

            model.title = txtTitle.Text.Trim();
            if (cbIsLock.Checked == true)
            {
                model.is_lock = 0;
            }
            else
            {
                model.is_lock = 1;
            }
            model.is_mobile = Utils.StrToInt(rblIsMobile.SelectedValue, 0);
            model.sort_id = Utils.StrToInt(txtSortId.Text.Trim(), 99);
            model.api_path = txtApiPath.Text.Trim();
            model.app_id = txtAppId.Text.Trim();
            model.app_key = txtAppKey.Text.Trim();
            model.img_url = txtImgUrl.Text.Trim();
            model.remark = txtRemark.Text;
            if (bll.Update(model))
            {
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改OAuth信息:" + model.title); //记录日志
                result = true;
            }

            return result;
        }