Example #1
0
        private void TreeBind(string strWhere)
        {
            BLL.Motorcade bll = new BLL.Motorcade();
            DataTable     dt  = bll.GetList(0, strWhere, "Id desc").Tables[0];

            this.ddlMotorcadeName.Items.Clear();
            this.ddlMotorcadeName.Items.Add(new ListItem("不限", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlMotorcadeName.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
            }
        }
Example #2
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page        = DTRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.Motorcade bll = new BLL.Motorcade();
            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("motorcade_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");

            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Example #3
0
        private void TreeBind(string strWhere)
        {
            BLL.Motorcade bll = new BLL.Motorcade();
            DataTable     dt  = bll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlMotorcade.Items.Clear();
            ddlMotorcade.Items.Add(new ListItem("请选择车队", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlMotorcade.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
            }
            ddlMotorcade.SelectedIndex = 0;

            string motorcadeName = ddlMotorcade.SelectedValue;

            BLL.Vehicle vehicleBll = new BLL.Vehicle();
            ddlCarNumber.Items.Clear();
            ddlCarNumber.Items.Add(new ListItem("请选择车辆", ""));
            if (!string.IsNullOrEmpty(motorcadeName))
            {
                DataTable vehicledt = vehicleBll.GetList(0, " MotorcadeName = '" + motorcadeName + "' ", "Id desc").Tables[0];

                foreach (DataRow dr in vehicledt.Rows)
                {
                    this.ddlCarNumber.Items.Add(new ListItem(dr["CarCode"].ToString(), dr["CarCode"].ToString()));
                }
            }
            else
            {
                DataTable vehicledt = vehicleBll.GetList(0, "", "Id desc").Tables[0];

                foreach (DataRow dr in vehicledt.Rows)
                {
                    this.ddlCarNumber.Items.Add(new ListItem(dr["CarCode"].ToString(), dr["CarCode"].ToString()));
                }
            }

            BLL.Order orderBll = new BLL.Order();
            this.rptList.DataSource = orderBll.GetList(" Quantity > DispatchedCount or (IsCharteredCar = 1 and DispatchedCount = 0.00)");
            this.rptList.DataBind();
        }
Example #4
0
        private void RptBind(string _strWhere, string _orderby)
        {
            this.page = DTRequest.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.Motorcade bll = new BLL.Motorcade();
            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("motorcade_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Example #5
0
        private void TreeBind(string strWhere)
        {
            BLL.Motorcade bll = new BLL.Motorcade();
            DataTable dt = bll.GetList(0, strWhere, "Id desc").Tables[0];

            this.ddlMotorcadeName.Items.Clear();
            this.ddlMotorcadeName.Items.Add(new ListItem("请选择车队...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlMotorcadeName.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
            }

            BLL.MotorcycleType mtBLL = new BLL.MotorcycleType();
            DataTable mtdt = mtBLL.GetList(0, strWhere, "Id desc").Tables[0];

            this.ddlMotorcycleType.Items.Clear();
            this.ddlMotorcycleType.Items.Add(new ListItem("请选择车型...", ""));
            foreach (DataRow dr in mtdt.Rows)
            {
                this.ddlMotorcycleType.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
            }
        }
Example #6
0
        private void TreeBind(string strWhere)
        {
            BLL.Motorcade bll = new BLL.Motorcade();
            DataTable dt = bll.GetList(0, strWhere, "Id desc").Tables[0];

            ddlMotorcade.Items.Clear();
            ddlMotorcade.Items.Add(new ListItem("请选择车队", ""));
            foreach (DataRow dr in dt.Rows)
            {
                this.ddlMotorcade.Items.Add(new ListItem(dr["Name"].ToString(), dr["Name"].ToString()));
            }
            ddlMotorcade.SelectedIndex = 0;

            string motorcadeName = ddlMotorcade.SelectedValue;
            BLL.Vehicle vehicleBll = new BLL.Vehicle();
            ddlCarNumber.Items.Clear();
            ddlCarNumber.Items.Add(new ListItem("请选择车辆", ""));
            if (!string.IsNullOrEmpty(motorcadeName))
            {
                DataTable vehicledt = vehicleBll.GetList(0, " MotorcadeName = '" + motorcadeName + "' ", "Id desc").Tables[0];

                foreach (DataRow dr in vehicledt.Rows)
                {
                    this.ddlCarNumber.Items.Add(new ListItem(dr["CarCode"].ToString(), dr["CarCode"].ToString()));
                }
            }
            else
            {
                DataTable vehicledt = vehicleBll.GetList(0, "", "Id desc").Tables[0];

                foreach (DataRow dr in vehicledt.Rows)
                {
                    this.ddlCarNumber.Items.Add(new ListItem(dr["CarCode"].ToString(), dr["CarCode"].ToString()));
                }
            }

            BLL.Order orderBll = new BLL.Order();
            this.rptList.DataSource = orderBll.GetList(" Quantity > DispatchedCount or (IsCharteredCar = 1 and DispatchedCount = 0.00)");
            this.rptList.DataBind();
        }