コード例 #1
0
 private void ShowInfo(int _id)
 {
     DTcms.BLL.photo_attribute   bll   = new BLL.photo_attribute();
     DTcms.Model.photo_attribute model = bll.GetModel(_id);
     txtTitle.Text         = model.title;
     txtRemark.Text        = model.remark;
     ddlType.SelectedValue = model.type.ToString();
     txtDefaultValue.Text  = model.default_value;
     txtSortId.Text        = model.sort_id.ToString();
 }
コード例 #2
0
        private bool DoEdit(int _id)
        {
            bool result = true;

            DTcms.BLL.photo_attribute   bll   = new BLL.photo_attribute();
            DTcms.Model.photo_attribute model = bll.GetModel(_id);
            model.title         = txtTitle.Text.Trim();
            model.remark        = txtRemark.Text.Trim();
            model.type          = int.Parse(ddlType.SelectedValue);
            model.default_value = txtDefaultValue.Text.Trim();
            model.sort_id       = int.Parse(txtSortId.Text.Trim());
            if (!bll.Update(model))
            {
                result = false;
            }

            return(result);
        }
コード例 #3
0
        private bool DoEdit(int _id)
        {
            bool result = true;
            DTcms.BLL.photo_attribute bll = new BLL.photo_attribute();
            DTcms.Model.photo_attribute model = bll.GetModel(_id);
            model.title = txtTitle.Text.Trim();
            model.remark = txtRemark.Text.Trim();
            model.type = int.Parse(ddlType.SelectedValue);
            model.default_value = txtDefaultValue.Text.Trim();
            model.sort_id = int.Parse(txtSortId.Text.Trim());
            if (!bll.Update(model))
            {
                result = false;
            }

            return result;
        }
コード例 #4
0
 private void ShowInfo(int _id)
 {
     DTcms.BLL.photo_attribute bll = new BLL.photo_attribute();
     DTcms.Model.photo_attribute model = bll.GetModel(_id);
     txtTitle.Text = model.title;
     txtRemark.Text = model.remark;
     ddlType.SelectedValue = model.type.ToString();
     txtDefaultValue.Text = model.default_value;
     txtSortId.Text = model.sort_id.ToString();
 }