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(); }
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); }
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; }
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(); }