예제 #1
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.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.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()));
            }
        }
예제 #2
0
        private void TreeBind(string strWhere)
        {
            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["Name"].ToString()));
            }

            BLL.Customer customerBll = new BLL.Customer();
            DataTable    customerDT  = customerBll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlCustomer1.Items.Clear();
            ddlCustomer1.Items.Add(new ListItem("托运方", ""));
            ddlCustomer2.Items.Clear();
            ddlCustomer2.Items.Add(new ListItem("收货方", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                if (!dr["Category"].ToString().Equals("托运方"))
                {
                    this.ddlCustomer2.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["ShortName"].ToString()));
                }
                if (!dr["Category"].ToString().Equals("收货方"))
                {
                    this.ddlCustomer1.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["ShortName"].ToString()));
                }
            }
        }
예제 #3
0
        private void RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.customer_id > 0)
            {
                this.ddlCustomer.SelectedValue = this.customer_id.ToString();
            }
            if (this.store_mode_id > 0)
            {
                this.ddlStoreMode.SelectedValue = this.store_mode_id.ToString();
            }
            if (this.handling_mode_id > 0)
            {
                this.ddlHandlingMode.SelectedValue = this.handling_mode_id.ToString();
            }
            txtKeywords.Text = this.keywords;
            BLL.Goods bll = new BLL.Goods();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _goodsby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("goods_list.aspx", "customer_id={0}&store_mode_id={1}&handling_mode_id={2}&keywords={3}&page={4}",
                                              this.customer_id.ToString(), this.store_mode_id.ToString(), this.handling_mode_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.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 btSearchRoomGoods_Click(object sender, EventArgs e)
        {
            string information = "";

            switch (combRoomGoods.Text.Trim())
            {
            case "编号":
                information = "goodsID";
                break;

            case "名称":
                information = "goodsName";
                break;

            case "价格":
                information = "goodsPrice";
                break;

            default:
                break;
            }
            Maticsoft.BLL.Goods go = new BLL.Goods();
            string  string1        = string.Format("{0} = '{1}'", information, tbRoomGoods.Text.Trim());
            DataSet ds             = new DataSet();

            ds = go.GetList(string1);
            dgvRoomGoods.DataSource = ds.Tables[0];
            ds.Tables[0].Columns["goodsId"].ColumnName    = "编号";
            ds.Tables[0].Columns["goodsName"].ColumnName  = "名称";
            ds.Tables[0].Columns["goodsPrice"].ColumnName = "价格";
            ds.Tables[0].Columns["roomTypeID"].ColumnName = "房型";
            dgvRoomGoods.AllowUserToAddRows = false;
            dgvRoomGoods.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
        }
예제 #6
0
        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()));
            }
        }
예제 #7
0
 /// <summary>
 /// 绑定费用类别
 /// </summary>
 public void BindFYLB()
 {
     // DataSet dt = fmcost.GetList(" Goods_ifType=0");
     DDlfylb.DataSource     = fmcost.GetList(" Goods_ifType=0");
     DDlfylb.DataValueField = "id";
     DDlfylb.DataTextField  = "Goods_name";
     DDlfylb.DataBind();
     DDlfylb.Items.Insert(0, "请选择费用类别");
 }
예제 #8
0
        private void TreeBind(string strWhere)
        {
            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.Customer customerBll = new BLL.Customer();
            DataTable    customerDT  = customerBll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlCustomer1.Items.Clear();
            ddlCustomer1.Items.Add(new ListItem("托运方", ""));
            ddlCustomer2.Items.Clear();
            ddlCustomer2.Items.Add(new ListItem("收货方", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                if (!dr["Category"].ToString().Equals("托运方"))
                {
                    this.ddlCustomer2.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString()));
                }
                if (!dr["Category"].ToString().Equals("收货方"))
                {
                    this.ddlCustomer1.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["Name"].ToString()));
                }
                if (!dr["CategoryName"].ToString().Equals("装货地址"))
                {
                    this.ddlUnloadingAddress.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
                }
            }

            ddlIsAllot.Items.Clear();
            ddlIsAllot.Items.Add(new ListItem("是否调拨单", "0"));
            ddlIsAllot.Items.Add(new ListItem("是", "1"));
            ddlIsAllot.Items.Add(new ListItem("否", "2"));
        }
예제 #9
0
        private void TreeBind(string strWhere)
        {
            BLL.Goods goodsBLL   = new BLL.Goods();
            DataTable customerDT = goodsBLL.GetList(0, strWhere, "Id desc").Tables[0];

            this.ddlGoods.Items.Clear();
            this.ddlGoods.Items.Add(new ListItem("货物", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                this.ddlGoods.Items.Add(new ListItem(dr["Name"].ToString(), dr["Id"].ToString()));
            }
        }
예제 #10
0
        private void GoodsBind(int customerId)
        {
            BLL.Goods goodsBLL = new BLL.Goods();
            DataTable goodsDT  = goodsBLL.GetList(0, "CustomerId = " + customerId + "", "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()));
            }
        }
예제 #11
0
        public void Bind()
        {
            txt_name.Value = "";
            string  Content = "<ul><li onclick=\"ShowDiv('0')\" style=\"background:#4486b7; height:30px; color:#fff;\">&nbsp;&nbsp;&nbsp;全部</li>";
            DataSet dt      = fmcost.GetList(" Goods_ifType=0");

            foreach (DataRow dr in dt.Tables[0].Rows)
            {
                Content += "<li class=\"lis\" onclick=\"ShowDiv('" + dr["id"] + "',this)\">&nbsp;&nbsp;&nbsp;" + dr["Goods_name"] + "<a href='#' class=\"dela\" onclick='deletes(" + dr["id"] + ")'><img src='../../images/scicon.png' width='14' height='16' /></a><a class=\"modif\" onclick=\"Goodsupa(this," + dr["id"] + ",0)\" href='#'><img src='../../images/bj_icon.png' width='14' height='16' /></a></li>";
            }
            Content          += "</ul>";
            DivHrml.InnerHtml = Content;
        }
        public void RoomGoodsLoad()
        {
            Maticsoft.BLL.Goods go = new BLL.Goods();
            DataSet             ds = new DataSet();

            ds = go.GetList("");
            dgvRoomGoods.DataSource = ds.Tables[0];
            ds.Tables[0].Columns["goodsId"].ColumnName    = "编号";
            ds.Tables[0].Columns["goodsName"].ColumnName  = "名称";
            ds.Tables[0].Columns["goodsPrice"].ColumnName = "价格";
            ds.Tables[0].Columns["roomTypeID"].ColumnName = "房型";
            dgvRoomGoods.AllowUserToAddRows = false;
            dgvRoomGoods.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
        }
예제 #13
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page             = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.Goods bll = new BLL.Goods();
            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("goods_list.aspx", "keywords={0}&page={1}",
                                              this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #14
0
        protected void btnGetPrice_Click(object sender, EventArgs e)
        {
            DataSet dt = fmgoods.GetList(" id=" + txtid.Value + "");

            foreach (DataRow dr in dt.Tables[0].Rows)
            {
                double money = Convert.ToDouble(txt_Num.Value) * Convert.ToDouble(dr["Goods_price"]);
                string a     = dr["Goods_number"].ToString().Trim();
                if (txt_Number.Value.Trim().Contains(dr["Goods_number"].ToString()))
                {
                    txt_Sumnum.Value = dr["Goods_number"].ToString();
                }
                else
                {
                    hidcontent.Value += dr["Goods_number"].ToString() + "#" + dr["Goods_name"].ToString() + "#" + dr["Goods_unit"].ToString() + "#" + dr["Goods_price"].ToString() + "#" + txt_Num.Value + "#" + money + "|";
                    txt_Number.Value += dr["Goods_number"].ToString() + ",";
                }
            }

            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "qwwqwq", "DisList('" + hidcontent.Value + "');", true);
        }
        private void TreeBind(string strWhere)
        {
            BLL.StoreInOrder storeinOrderBLL = new BLL.StoreInOrder();
            DataTable        customerDT      = storeinOrderBLL.GetList(0, " Status = 2 ", "Id desc").Tables[0];

            this.ddlStoreInOrder.Items.Clear();
            this.ddlStoreInOrder.Items.Add(new ListItem("所属入库单", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                this.ddlStoreInOrder.Items.Add(new ListItem(dr["AccountNumber"].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()));
            }
        }
예제 #16
0
        private void TreeBind(string strWhere)
        {
            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["Name"].ToString()));
            }

            BLL.Customer customerBll = new BLL.Customer();
            DataTable customerDT = customerBll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlCustomer1.Items.Clear();
            ddlCustomer1.Items.Add(new ListItem("托运方", ""));
            ddlCustomer2.Items.Clear();
            ddlCustomer2.Items.Add(new ListItem("收货方", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                if (!dr["Category"].ToString().Equals("托运方"))
                {
                    this.ddlCustomer2.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["ShortName"].ToString()));
                }
                if (!dr["Category"].ToString().Equals("收货方"))
                {
                    this.ddlCustomer1.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["ShortName"].ToString()));
                }
            }
        }
예제 #17
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            frmTop.FormBorderStyle = FormBorderStyle.None;
            frmTop.WindowState     = FormWindowState.Maximized;
            frmTop.BackColor       = Color.FromArgb(30, 110, 165);
            Label lbl = new Label();

            lbl.AutoSize  = false;
            lbl.ForeColor = Color.White;
            lbl.TextAlign = ContentAlignment.MiddleCenter;
            lbl.Font      = new Font("SimSun", 20);
            lbl.Text      = "正在初始数据……";
            lbl.Dock      = DockStyle.Fill;
            frmTop.Controls.Add(lbl);
            frmTop.Show();
            Application.DoEvents();
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                IBLL.IGoods goodsBLL = new BLL.Goods();
                clsList      = goodsBLL.GetClsList();
                goodsListAll = goodsBLL.GetList("", "");

                foreach (Model.bi_t_item_info item in goodsListAll)
                {
                    if (String.IsNullOrWhiteSpace(item.item_no))
                    {
                        continue;
                    }
                    goodsDic.Add(item.item_no, item);
                }

                foreach (Model.bi_t_item_cls cls in clsList)
                {
                    List <Model.bi_t_item_info> lst = new List <Model.bi_t_item_info>();
                    foreach (Model.bi_t_item_info gd in goodsListAll)
                    {
                        if (gd.item_clsno.Length >= 2 && gd.item_clsno.Substring(0, 2) == cls.item_clsno)
                        {
                            lst.Add(gd);
                        }
                    }

                    clsDic.Add(cls.item_clsno, lst);
                }

                if (clsList.Count != 0)
                {
                    clsDic.TryGetValue(clsList[0].item_clsno, out this.goodsList);
                }

                newOrder("销售退货");
                ShowBottom();
            }
            catch (Exception ex)
            {
                new MsgForm(ex.GetMessage()).ShowDialog();
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
예제 #18
0
        private void TreeBind(string strWhere)
        {
            BLL.StoreInOrder storeinOrderBLL = new BLL.StoreInOrder();
            DataTable customerDT = storeinOrderBLL.GetList(0, " Status = 2 ", "Id desc").Tables[0];

            this.ddlStoreInOrder.Items.Clear();
            this.ddlStoreInOrder.Items.Add(new ListItem("所属入库单", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                this.ddlStoreInOrder.Items.Add(new ListItem(dr["AccountNumber"].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()));
            }
        }
예제 #19
0
        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("预付", "预付"));
        }
예제 #20
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.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.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()));
            }
        }
예제 #21
0
        private void TreeBind(string strWhere)
        {
            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.Customer customerBll = new BLL.Customer();
            DataTable customerDT = customerBll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlCustomer1.Items.Clear();
            ddlCustomer1.Items.Add(new ListItem("托运方", ""));
            ddlCustomer2.Items.Clear();
            ddlCustomer2.Items.Add(new ListItem("收货方", ""));
            foreach (DataRow dr in customerDT.Rows)
            {
                if (!dr["Category"].ToString().Equals("托运方"))
                {
                    this.ddlCustomer2.Items.Add(new ListItem(dr["ShortName"].ToString(), dr["Id"].ToString()));
                }
                if (!dr["Category"].ToString().Equals("收货方"))
                {
                    this.ddlCustomer1.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["Name"].ToString()));
                }
                if (!dr["CategoryName"].ToString().Equals("装货地址"))
                {
                    this.ddlUnloadingAddress.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
                }
            }

            ddlIsAllot.Items.Clear();
            ddlIsAllot.Items.Add(new ListItem("是否调拨单", "0"));
            ddlIsAllot.Items.Add(new ListItem("是", "1"));
            ddlIsAllot.Items.Add(new ListItem("否", "2"));
        }
예제 #22
0
        private void RptBind(string _strWhere, string _goodsby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            if (this.customer_id > 0)
            {
                this.ddlCustomer.SelectedValue = this.customer_id.ToString();
            }
            if (this.store_mode_id > 0)
            {
                this.ddlStoreMode.SelectedValue = this.store_mode_id.ToString();
            }
            if (this.handling_mode_id > 0)
            {
                this.ddlHandlingMode.SelectedValue = this.handling_mode_id.ToString();
            }
            txtKeywords.Text = this.keywords;
            BLL.Goods bll = new BLL.Goods();
            this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _goodsby, out this.totalCount);
            this.rptList.DataBind();

            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("goods_list.aspx", "customer_id={0}&store_mode_id={1}&handling_mode_id={2}&keywords={3}&page={4}",
                this.customer_id.ToString(), this.store_mode_id.ToString(), this.handling_mode_id.ToString(), this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
예제 #23
0
        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()));
            }
        }
예제 #24
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            this.txtKeywords.Text = this.keywords;
            BLL.Goods bll = new BLL.Goods();
            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("goods_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.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>";
            }
        }
예제 #26
0
        private void GoodsBind(int customerId)
        {
            BLL.Goods goodsBLL = new BLL.Goods();
            DataTable goodsDT = goodsBLL.GetList(0, "CustomerId = " + customerId + "", "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()));
            }
        }