private void TreeBind(string strWhere) { BLL.Haulway haulwayBll = new BLL.Haulway(); DataTable haulwayDT = haulwayBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlHaulway.Items.Clear(); ddlHaulway.Items.Add(new ListItem("请选择运输路线", "")); foreach (DataRow dr in haulwayDT.Rows) { this.ddlHaulway.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Customer customerBll = new BLL.Customer(); DataTable customerDT = customerBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlShipper.Items.Clear(); ddlShipper.Items.Add(new ListItem("请选择托运方", "")); ddlReceiver.Items.Clear(); ddlReceiver.Items.Add(new ListItem("请选择收货方", "")); foreach (DataRow dr in customerDT.Rows) { if (!dr["Category"].ToString().Equals("托运方")) { this.ddlReceiver.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } if (!dr["Category"].ToString().Equals("收货方")) { this.ddlShipper.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } } BLL.Address addressBll = new BLL.Address(); DataTable addressDT = addressBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlLoadingAddress.Items.Clear(); ddlLoadingAddress.Items.Add(new ListItem("请选择装货地址", "")); ddlUnloadingAddress.Items.Clear(); ddlUnloadingAddress.Items.Add(new ListItem("请选择卸货地址", "")); foreach (DataRow dr in addressDT.Rows) { if (!dr["CategoryName"].ToString().Equals("卸货地址")) { this.ddlLoadingAddress.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } if (!dr["CategoryName"].ToString().Equals("装货地址")) { this.ddlUnloadingAddress.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]; ddlGoods.Items.Clear(); ddlGoods.Items.Add(new ListItem("请选择承运货物", "")); foreach (DataRow dr in goodsDT.Rows) { this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; BLL.Haulway bll = new BLL.Haulway(); 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("haulway_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; BLL.Haulway bll = new BLL.Haulway(); 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("haulway_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
private void TreeBind(string strWhere) { BLL.Haulway haulwayBll = new BLL.Haulway(); DataTable haulwayDT = haulwayBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlHaulway.Items.Clear(); ddlHaulway.Items.Add(new ListItem("请选择运输路线", "")); foreach (DataRow dr in haulwayDT.Rows) { this.ddlHaulway.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.Customer customerBll = new BLL.Customer(); DataTable customerDT = customerBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlShipper.Items.Clear(); ddlShipper.Items.Add(new ListItem("请选择托运方", "")); ddlReceiver.Items.Clear(); ddlReceiver.Items.Add(new ListItem("请选择收货方", "")); foreach (DataRow dr in customerDT.Rows) { if (!dr["Category"].ToString().Equals("托运方")) { this.ddlReceiver.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } if (!dr["Category"].ToString().Equals("收货方")) { this.ddlShipper.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } } BLL.Address addressBll = new BLL.Address(); DataTable addressDT = addressBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlLoadingAddress.Items.Clear(); ddlLoadingAddress.Items.Add(new ListItem("请选择装货地址", "")); ddlUnloadingAddress.Items.Clear(); ddlUnloadingAddress.Items.Add(new ListItem("请选择卸货地址", "")); foreach (DataRow dr in addressDT.Rows) { if (!dr["CategoryName"].ToString().Equals("卸货地址")) { this.ddlLoadingAddress.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } if (!dr["CategoryName"].ToString().Equals("装货地址")) { this.ddlUnloadingAddress.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]; ddlGoods.Items.Clear(); ddlGoods.Items.Add(new ListItem("请选择承运货物", "")); foreach (DataRow dr in goodsDT.Rows) { this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } BLL.TransportOrder transportOrderBLL = new BLL.TransportOrder(); DataTable transportOrderDT = transportOrderBLL.GetSelectList(0, " A.Status = 0", "Id DESC").Tables[0]; ddlTransportOrder.Items.Clear(); ddlTransportOrder.Items.Add(new ListItem("请选择运输单", "")); foreach (DataRow dr in transportOrderDT.Rows) { this.ddlTransportOrder.Items.Add(new ListItem(string.Format("{0}({1})", dr["CarNumber"].ToString(), dr["Code"].ToString()), dr["Id"].ToString())); } }
private void TreeBind(string strWhere) { BLL.Haulway haulwayBll = new BLL.Haulway(); DataTable haulwayDT = haulwayBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlHaulway.Items.Clear(); ddlHaulway.Items.Add(new ListItem("请选择运输路线", "")); foreach (DataRow dr in haulwayDT.Rows) { this.ddlHaulway.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } ddlFormula.Items.Clear(); ddlFormula.Items.Add(new ListItem("计量*运费单价", "1")); ddlFormula.Items.Add(new ListItem("计量*公里*运费单价", "2")); ddlFormula.Items.Add(new ListItem("固定运费", "3")); BLL.Customer customerBll = new BLL.Customer(); DataTable customerDT = customerBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlShipper.Items.Clear(); ddlShipper.Items.Add(new ListItem("请选择托运方", "")); ddlReceiver.Items.Clear(); ddlReceiver.Items.Add(new ListItem("请选择收货方", "")); foreach (DataRow dr in customerDT.Rows) { if (!dr["Category"].ToString().Equals("托运方")) { this.ddlReceiver.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } if (!dr["Category"].ToString().Equals("收货方")) { this.ddlShipper.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString())); } } BLL.Address addressBll = new BLL.Address(); DataTable addressDT = addressBll.GetList(0, strWhere, "Id desc").Tables[0]; ddlLoadingAddress.Items.Clear(); ddlLoadingAddress.Items.Add(new ListItem("请选择装货地址", "")); ddlUnloadingAddress.Items.Clear(); ddlUnloadingAddress.Items.Add(new ListItem("请选择卸货地址", "")); foreach (DataRow dr in addressDT.Rows) { if (!dr["CategoryName"].ToString().Equals("卸货地址")) { this.ddlLoadingAddress.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } if (!dr["CategoryName"].ToString().Equals("装货地址")) { this.ddlUnloadingAddress.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]; ddlGoods.Items.Clear(); ddlGoods.Items.Add(new ListItem("请选择承运货物", "")); foreach (DataRow dr in goodsDT.Rows) { this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString())); } ddlSettleAccountsWay.Items.Clear(); ddlSettleAccountsWay.Items.Add(new ListItem("现结", "现结")); ddlSettleAccountsWay.Items.Add(new ListItem("月结", "月结")); ddlSettleAccountsWay.Items.Add(new ListItem("预付", "预付")); }