//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("store_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限 int sucCount = 0; int errorCount = 0; BLL.Store bll = new BLL.Store(); 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_list.aspx", "store_domain_id={0}&keywords={1}", this.store_domain_id.ToString(), this.keywords)); }
private void TreeBind(string strWhere) { BLL.Customer customerBLL = new BLL.Customer(); DataTable customerDT = customerBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlCustomer.Items.Clear(); this.ddlCustomer.Items.Add(new ListItem("所属客户", "")); foreach (DataRow dr in customerDT.Rows) { this.ddlCustomer.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Goods goodsBLL = new BLL.Goods(); DataTable goodsDT = goodsBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlGoods.Items.Clear(); this.ddlGoods.Items.Add(new ListItem("货物", "")); foreach (DataRow dr in goodsDT.Rows) { this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); DataTable storeDT = storeBLL.GetAllList().Tables[0]; storeOptions += "<option value='0'>选择仓库</option>"; foreach (DataRow dr in storeDT.Rows) { storeOptions += "<option value='" + dr["Id"] + "'>" + dr["Name"] + "</option>"; } }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("store_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限 int sucCount = 0; int errorCount = 0; BLL.Store bll = new BLL.Store(); 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_list.aspx", "store_domain_id={0}&keywords={1}", this.store_domain_id.ToString(), this.keywords)); }
private void ShowInfo(int _id) { BLL.Store bll = new BLL.Store(); Model.Store model = bll.GetModel(_id); ddlStoreDomain.SelectedValue = model.StoreDomainId.ToString(); txtName.Text = model.Name; txtManager.Text = model.Manager; txtAddress.Text = model.Address; txtRemark.Text = model.Remark; }
public ActionResult StoreManName(int?storeId) { if (storeId.HasValue) { BLL.Store store = _storService.FindById(storeId.Value); if (store != null && !string.IsNullOrEmpty(store.StoreManName)) { return(Json(store.StoreManName, JsonRequestBehavior.AllowGet)); } return(Json("Please Specify", JsonRequestBehavior.AllowGet)); } return(Json("", JsonRequestBehavior.AllowGet)); }
private void TreeBind(string strWhere) { BLL.StoreInOrder stroeInOrderBLL = new BLL.StoreInOrder(); DataTable stroeInOrderDT = stroeInOrderBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlStoreInOrder.Items.Clear(); this.ddlStoreInOrder.Items.Add(new ListItem("选择入库单", "")); foreach (DataRow dr in stroeInOrderDT.Rows) { this.ddlStoreInOrder.Items.Add(new ListItem(dr["AccountNumber"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); storeDT = storeBLL.GetAllList().Tables[0]; }
private void TreeBind(string strWhere) { BLL.Customer customerBLL = new BLL.Customer(); DataTable customerDT = customerBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlCustomer.Items.Clear(); this.ddlCustomer.Items.Add(new ListItem("客户", "")); foreach (DataRow dr in customerDT.Rows) { this.ddlCustomer.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); storeDT = storeBLL.GetAllList().Tables[0]; }
private bool DoAdd() { bool result = false; Model.Store model = new Model.Store(); BLL.Store bll = new BLL.Store(); model.StoreDomainId = int.Parse(ddlStoreDomain.SelectedValue); model.Name = txtName.Text; model.Manager = txtManager.Text; model.Address = txtAddress.Text; model.Remark = txtRemark.Text; if (bll.Add(model)) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库:" + model.Name); //记录日志 result = true; } return result; }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); if (this.store_domain_id > 0) { this.ddlStoreDomain.SelectedValue = this.store_domain_id.ToString(); } this.txtKeywords.Text = this.keywords; BLL.Store bll = new BLL.Store(); 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("store_list.aspx", "store_domain_id={0}&keywords={1}&page={2}", this.store_domain_id.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private bool DoEdit(int _id) { bool result = false; BLL.Store bll = new BLL.Store(); Model.Store model = bll.GetModel(_id); model.StoreDomainId = int.Parse(ddlStoreDomain.SelectedValue); model.Name = txtName.Text; model.Manager = txtManager.Text; model.Address = txtAddress.Text; model.Remark = txtRemark.Text; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库信息:" + model.Name); //记录日志 result = true; } return(result); }
private bool DoAdd() { bool result = false; Model.Store model = new Model.Store(); BLL.Store bll = new BLL.Store(); model.StoreDomainId = int.Parse(ddlStoreDomain.SelectedValue); model.Name = txtName.Text; model.Manager = txtManager.Text; model.Address = txtAddress.Text; model.Remark = txtRemark.Text; if (bll.Add(model)) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加仓库:" + model.Name); //记录日志 result = true; } return(result); }
public ActionResult StackNumbers(int?StoreID, int?editModval) { if (StoreID != null) { BLL.Store store = _storService.FindById(StoreID.Value); var stacks = new List <DRMFSS.Web.Models.SelectListItemModel>(); stacks.Add(new SelectListItemModel { Name = "N/A", Id = "0" }); //TODO just a hack for now for unknown stacks foreach (var i in store.Stacks) { stacks.Add(new SelectListItemModel { Name = i.ToString(), Id = i.ToString() }); } return(Json(new SelectList(stacks, "Id", "Name", editModval), JsonRequestBehavior.AllowGet)); } else { return(Json(new SelectList(Enumerable.Empty <SelectListItem>()), JsonRequestBehavior.AllowGet)); } }
private void TreeBind(string strWhere) { BLL.Customer customerBLL = new BLL.Customer(); DataTable customerDT = customerBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlCustomer.Items.Clear(); this.ddlCustomer.Items.Add(new ListItem("所属客户", "")); foreach (DataRow dr in customerDT.Rows) { this.ddlCustomer.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Goods goodsBLL = new BLL.Goods(); DataTable goodsDT = goodsBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlGoods.Items.Clear(); this.ddlGoods.Items.Add(new ListItem("货物", "")); foreach (DataRow dr in goodsDT.Rows) { this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); DataTable storeDT = storeBLL.GetAllList().Tables[0]; storeOptions += "<option value='0'>选择仓库</option>"; foreach (DataRow dr in storeDT.Rows) { storeOptions += "<option value='" + dr["Id"] + "'>" + dr["Name"] + "</option>"; } }
private void TreeBind(string strWhere) { BLL.StoreInOrder stroeInOrderBLL = new BLL.StoreInOrder(); DataTable stroeInOrderDT = stroeInOrderBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlStoreInOrder.Items.Clear(); this.ddlStoreInOrder.Items.Add(new ListItem("选择入库单", "")); foreach (DataRow dr in stroeInOrderDT.Rows) { this.ddlStoreInOrder.Items.Add(new ListItem(dr["AccountNumber"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); storeDT = storeBLL.GetAllList().Tables[0]; }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); if (this.store_domain_id > 0) { this.ddlStoreDomain.SelectedValue = this.store_domain_id.ToString(); } this.txtKeywords.Text = this.keywords; BLL.Store bll = new BLL.Store(); 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("store_list.aspx", "store_domain_id={0}&keywords={1}&page={2}", this.store_domain_id.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void TreeBind(string strWhere) { BLL.Customer customerBLL = new BLL.Customer(); DataTable customerDT = customerBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlCustomer.Items.Clear(); this.ddlCustomer.Items.Add(new ListItem("客户", "")); foreach (DataRow dr in customerDT.Rows) { this.ddlCustomer.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Store storeBLL = new BLL.Store(); storeDT = storeBLL.GetAllList().Tables[0]; }
private bool DoEdit(int _id) { bool result = false; BLL.Store bll = new BLL.Store(); Model.Store model = bll.GetModel(_id); model.StoreDomainId = int.Parse(ddlStoreDomain.SelectedValue); model.Name = txtName.Text; model.Manager = txtManager.Text; model.Address = txtAddress.Text; model.Remark = txtRemark.Text; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改仓库信息:" + model.Name); //记录日志 result = true; } return result; }
private void ShowInfo(int _id) { BLL.Store bll = new BLL.Store(); Model.Store model = bll.GetModel(_id); ddlStoreDomain.SelectedValue = model.StoreDomainId.ToString(); txtName.Text = model.Name; txtManager.Text = model.Manager; txtAddress.Text = model.Address; txtRemark.Text = model.Remark; }