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.StoreMode storeModeBLL = new BLL.StoreMode(); DataTable storeModeDT = storeModeBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlStoreMode.Items.Clear(); this.ddlStoreMode.Items.Add(new ListItem("存储方式", "")); foreach (DataRow dr in storeModeDT.Rows) { this.ddlStoreMode.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.HandlingMode handlingModeBLL = new BLL.HandlingMode(); DataTable handlingModeDT = handlingModeBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlHandlingMode.Items.Clear(); this.ddlHandlingMode.Items.Add(new ListItem("装卸方式", "")); foreach (DataRow dr in handlingModeDT.Rows) { this.ddlHandlingMode.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
private void RptBind(string _strWhere) { this.txtKeywords.Text = this.keywords; BLL.HandlingMode bll = new BLL.HandlingMode(); this.rptList.DataSource = bll.GetList(0, _strWhere, "Id DESC"); this.rptList.DataBind(); }
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())); } this.ddlGoods.Items.Clear(); this.ddlGoods.Items.Add(new ListItem("选择货物", "")); BLL.Vehicle vehicleBLL = new BLL.Vehicle(); DataTable vehicleDT = vehicleBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlVehicle.Items.Clear(); this.ddlVehicle.Items.Add(new ListItem("选择车辆", "")); foreach (DataRow dr in vehicleDT.Rows) { this.ddlVehicle.Items.Add(new ListItem(dr["PlateNumber"].ToString(), dr["Id"].ToString())); } BLL.HandlingMode handlingModeBLL = new BLL.HandlingMode(); DataTable handlingModeDT = handlingModeBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlHandlingMode.Items.Clear(); this.ddlHandlingMode.Items.Add(new ListItem("选择装卸方式", "")); foreach (DataRow dr in handlingModeDT.Rows) { this.ddlHandlingMode.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("handling_mode", DTEnums.ActionEnum.Delete.ToString()); //检查权限 int sucCount = 0; int errorCount = 0; BLL.HandlingMode bll = new BLL.HandlingMode(); //批量删除 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("handling_mode_list.aspx", "keywords={0}", txtKeywords.Text.Trim())); }
private void ShowInfo(int _id) { BLL.HandlingMode bll = new BLL.HandlingMode(); Model.HandlingMode model = bll.GetModel(_id); txtName.Text = model.Name; txtRemark.Text = model.Remark; }
private bool DoAdd() { bool result = false; Model.HandlingMode model = new Model.HandlingMode(); BLL.HandlingMode bll = new BLL.HandlingMode(); 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.HandlingMode model = new Model.HandlingMode(); BLL.HandlingMode bll = new BLL.HandlingMode(); 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.HandlingMode bll = new BLL.HandlingMode(); Model.HandlingMode 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.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.StoreMode storeModeBLL = new BLL.StoreMode(); DataTable storeModeDT = storeModeBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlStoreMode.Items.Clear(); this.ddlStoreMode.Items.Add(new ListItem("存储方式", "")); foreach (DataRow dr in storeModeDT.Rows) { this.ddlStoreMode.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.HandlingMode handlingModeBLL = new BLL.HandlingMode(); DataTable handlingModeDT = handlingModeBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlHandlingMode.Items.Clear(); this.ddlHandlingMode.Items.Add(new ListItem("装卸方式", "")); foreach (DataRow dr in handlingModeDT.Rows) { this.ddlHandlingMode.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Unit unitBLL = new BLL.Unit(); DataTable unitDT = unitBLL.GetList(0, strWhere, "Id desc").Tables[0]; this.ddlUnit.Items.Clear(); this.ddlUnit.Items.Add(new ListItem("计量单位", "")); foreach (DataRow dr in unitDT.Rows) { this.ddlUnit.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
private bool DoEdit(int _id) { bool result = false; BLL.HandlingMode bll = new BLL.HandlingMode(); Model.HandlingMode 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; }