//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("store_domain", DTEnums.ActionEnum.Delete.ToString()); //检查权限 int sucCount = 0; int errorCount = 0; BLL.StoreDomain bll = new BLL.StoreDomain(); //批量删除 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) { if (bll.Delete(id)) { sucCount += 1; } else { errorCount += 1; } } } AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除仓库区域成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志 JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("store_domain_list.aspx", "keywords={0}", txtKeywords.Text.Trim())); }
private void ShowInfo(int _id) { BLL.StoreDomain bll = new BLL.StoreDomain(); Model.StoreDomain model = bll.GetModel(_id); txtName.Text = model.Name; txtRemark.Text = model.Remark; }
private void RptBind(string _strWhere) { this.txtKeywords.Text = this.keywords; BLL.StoreDomain bll = new BLL.StoreDomain(); this.rptList.DataSource = bll.GetList(0, _strWhere, "Id DESC"); this.rptList.DataBind(); }
private void TreeBind(string strWhere) { BLL.StoreDomain bll = new BLL.StoreDomain(); DataTable dt = bll.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlStoreDomain.Items.Clear(); this.ddlStoreDomain.Items.Add(new ListItem("请选择仓库区域...", "")); foreach (DataRow dr in dt.Rows) { this.ddlStoreDomain.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
private bool DoAdd() { bool result = false; Model.StoreDomain model = new Model.StoreDomain(); BLL.StoreDomain bll = new BLL.StoreDomain(); model.Name = txtName.Text; model.Remark = txtRemark.Text; if (bll.Add(model)) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库区域:" + model.Name); //记录日志 result = true; } return result; }
private bool DoAdd() { bool result = false; Model.StoreDomain model = new Model.StoreDomain(); BLL.StoreDomain bll = new BLL.StoreDomain(); model.Name = txtName.Text; model.Remark = txtRemark.Text; if (bll.Add(model)) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库区域:" + model.Name); //记录日志 result = true; } return(result); }
private bool DoEdit(int _id) { bool result = false; BLL.StoreDomain bll = new BLL.StoreDomain(); Model.StoreDomain model = bll.GetModel(_id); model.Name = txtName.Text; model.Remark = txtRemark.Text; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库区域:" + model.Name); //记录日志 result = true; } return(result); }
private void TreeBind(string strWhere) { BLL.StoreDomain bll = new BLL.StoreDomain(); DataTable dt = bll.GetList(0, strWhere, "id desc").Tables[0]; this.ddlStoreDomain.Items.Clear(); this.ddlStoreDomain.Items.Add(new ListItem("所有仓库区域", "")); foreach (DataRow dr in dt.Rows) { this.ddlStoreDomain.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
private bool DoEdit(int _id) { bool result = false; BLL.StoreDomain bll = new BLL.StoreDomain(); Model.StoreDomain model = bll.GetModel(_id); model.Name = txtName.Text; model.Remark = txtRemark.Text; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库区域:" + model.Name); //记录日志 result = true; } return result; }