private void ShowInfo(int _id) { BLL.shop bll = new BLL.shop(); Model.shop model = bll.GetModel(_id); txtShopName.Text = model.shop_name; txtTelphone.Text = model.telphone; txtAddress.Text = model.address; txtLinkman.Text = model.linkman; txtCity.Text = model.city; }
protected void Page_Load(object sender, EventArgs e) { this.pageSize = 20; //每页数量 if (!Page.IsPostBack) { BLL.shop bll = new BLL.shop(); string _strWhere = " user_id=" + userModel.id; string _orderby = ""; this.rptList.DataSource = bll.GetList(_strWhere, _orderby); this.rptList.DataBind(); } }
private bool DoEdit(int _id) { bool result = false; BLL.shop bll = new BLL.shop(); Model.shop model = bll.GetModel(_id); model.address = txtAddress.Text.Trim();; model.shop_name = txtShopName.Text.Trim(); model.telphone = txtTelphone.Text.Trim(); model.city = txtCity.Text.Trim(); model.linkman = txtLinkman.Text.Trim(); if (bll.Update(model)) { result = true; } return(result); }
private bool DoAdd() { bool result = false; Model.shop model = new Model.shop(); BLL.shop bll = new BLL.shop(); Model.users userModel = new Web.UI.BasePage().GetUserInfo(); model.address = txtAddress.Text.Trim();; model.user_id = userModel.id; model.shop_name = txtShopName.Text.Trim(); model.telphone = txtTelphone.Text.Trim(); model.city = txtCity.Text.Trim(); model.linkman = txtLinkman.Text.Trim(); if (bll.Add(model) > 0) { result = true; } return(result); }
protected void btnDelete_Click(object sender, EventArgs e) { this.id = AXRequest.GetQueryInt("id"); BLL.shop bll = new BLL.shop(); bll.Delete(this.id); }