private void ShowInfo(int _id) { Model.wx_wq_pinpai model = bll.GetModel(_id); this.txtLogo.Text = model.logo; this.imgLogo.ImageUrl = model.logo; this.txtName.Text = model.name; this.txtSort_id.Text = model.sort_id.ToString(); this.txtWebsite.Text = model.website; this.txtSummary.InnerText = model.remark; }
protected void rptPinpai_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Model.wx_wq_pinpai drv = (Model.wx_wq_pinpai)e.Item.DataItem; Literal ltr = e.Item.FindControl("litShow") as Literal; string select = ""; if (drv.Id == czModel.ppid) { select += "selected='selected'"; } ltr.Text = "<option value=\"" + drv.Id + "\" " + select + ">" + drv.name + "</option>"; } }
protected void Page_Load(object sender, EventArgs e) { wid = MXRequest.GetQueryInt("wid"); pid = MXRequest.GetQueryInt("pid"); openid = MXRequest.GetQueryString("openid"); if (!IsPostBack) { BLL.wx_wq_pinpai ppBll = new BLL.wx_wq_pinpai(); BLL.wx_wq_chexi cxBll = new BLL.wx_wq_chexi(); Model.wx_wq_pinpai ppModel = ppBll.GetModel(pid); ppLogo = ppModel.logo; pinpai = ppModel.name; this.rptList.DataSource = cxBll.GetList(string.Format(" wid={0} and pid={1} order by sort_id asc,id asc", wid, pid)); this.rptList.DataBind(); } }
private bool DoEdit(int _id) { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_wq_pinpai model = bll.GetModel(_id); bool result = false; model.logo = this.txtLogo.Text; model.name = this.txtName.Text; model.remark = this.txtSummary.InnerText; model.sort_id = MyCommFun.Str2Int(this.txtSort_id.Text); model.website = this.txtWebsite.Text; if (bll.Update(model)) { AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改汽车品牌内容id:" + model.Id); //记录日志 result = true; } return(result); }
private bool DoAdd() { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_wq_pinpai model = new Model.wx_wq_pinpai(); bool result = false; model.logo = this.txtLogo.Text; model.name = this.txtName.Text; model.remark = this.txtSummary.InnerText; model.sort_id = MyCommFun.Str2Int(this.txtSort_id.Text); model.website = this.txtWebsite.Text; model.wid = weixin.id; model.cratedate = DateTime.Now; if (bll.Add(model) > 0) { AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加产品库信息:" + model.name); //记录日志 result = true; } return(result); }