private void ShowInfo(int _id) { BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); Model.car_repair_iteminfo model = bll.GetModel(_id); txtCode.Text = model.Code; txtRepair_Item_Name.Text = model.Repair_Item_Name; }
private bool DoAdd() { bool result = true; Model.car_repair_iteminfo model = new Model.car_repair_iteminfo(); BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); model.Code = txtCode.Text.Trim(); model.Repair_Item_Name = txtRepair_Item_Name.Text; if (bll.Add(model) < 1) { result = false; } return(result); }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("car_repair_item_list.aspx", "group_id={0}&keywords={1}&page={2}", this.group_id.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private bool DoEdit(int _id) { bool result = true; BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); Model.car_repair_iteminfo model = bll.GetModel(_id); model.Code = txtCode.Text.Trim(); model.Repair_Item_Name = txtRepair_Item_Name.Text; if (!bll.Update(model)) { result = false; } return(result); }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("users", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { bll.Delete(id); } } JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("car_repair_item_list.aspx", "group_id={0}&keywords={1}", this.group_id.ToString(), this.keywords), "Success"); }