示例#1
0
        AreaBLL _AreaBLL = new AreaBLL(); //实例化

        /// <summary>
        /// 初始化数据
        /// </summary>
        private void InitData()
        {
            DataTable dt = _AreaBLL.SelectSystemAreaForProvince();

            this.drpProvince.DataSource     = dt;
            this.drpProvince.DataValueField = "GA03001";
            this.drpProvince.DataTextField  = "GA03002";
            this.drpProvince.DataBind();
            this.drpProvince.Items.Insert(0, new ListItem("请选择", ""));
        }
示例#2
0
        /// <summary>
        /// 绑定页面查询条件Dll
        /// </summary>
        private void BindDll()
        {
            #region 省市
            //获取省
            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();

            this.ddlGA03ProvinceDialog.DataSource     = dtGA03;
            this.ddlGA03ProvinceDialog.DataTextField  = "GA03002";
            this.ddlGA03ProvinceDialog.DataValueField = "GA03001";
            this.ddlGA03ProvinceDialog.DataBind();
            this.ddlGA03ProvinceDialog.Items.Insert(0, new ListItem("请选择", ""));

            //为市添加请选择选项
            this.ddlGA03CityDialog.Items.Insert(0, new ListItem("请选择", ""));

            #endregion
        }
示例#3
0
        AreaBLL _AreaBLL = new AreaBLL(); //实例化

        /// <summary>
        /// 初始化数据
        /// </summary>
        private void InitData()
        {
            if (!string.IsNullOrEmpty(Request.QueryString["GA03001"]))
            {
                DataTable dt = _AreaBLL.SelectSystemAreaById(Request.QueryString["GA03001"]);
                if (dt != null && dt.Rows.Count > 0)
                {
                    DataTable dt1 = _AreaBLL.SelectSystemAreaForProvince();
                    this.drpProvince.DataSource     = dt1;
                    this.drpProvince.DataValueField = "GA03001";
                    this.drpProvince.DataTextField  = "GA03002";
                    this.drpProvince.DataBind();
                    this.drpProvince.Items.Insert(0, new ListItem("请选择", ""));
                    this.txtGA03002.Text           = dt.Rows[0]["GA03002"].ToString();
                    this.txtGA03004.Text           = dt.Rows[0]["GA03004"].ToString();
                    this.drpProvince.SelectedValue = dt.Rows[0]["GA03003"].ToString();
                    this.ID.Value = dt.Rows[0]["GA03001"].ToString();
                }
            }
        }
示例#4
0
        /// <summary>
        /// 绑定页面查询条件Dll
        /// </summary>
        private void BindDll()
        {
            //获取省
            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();

            this.ddlGA03Province.DataSource     = dtGA03;
            this.ddlGA03Province.DataTextField  = "GA03002";
            this.ddlGA03Province.DataValueField = "GA03001";
            this.ddlGA03Province.DataBind();
            this.ddlGA03Province.Items.Insert(0, new ListItem("请选择", ""));

            //为市添加请选择选项
            //this.ddlGA03City.Items.Insert(0, new ListItem("请选择", ""));

            //行业代码
            DataTable dtCB04 = _CustomerBLL.SelectCustomerTradeCode();

            this.ddlCA01020.DataSource     = dtCB04;
            this.ddlCA01020.DataTextField  = "CB04002";
            this.ddlCA01020.DataValueField = "CB04001";
            this.ddlCA01020.DataBind();
            this.ddlCA01020.Items.Insert(0, new ListItem("请选择", ""));
        }
示例#5
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="Index"></param>
        private void InitData()
        {
            //获取省
            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();

            this.ddlProvince.DataSource     = dtGA03;
            this.ddlProvince.DataTextField  = "GA03002";
            this.ddlProvince.DataValueField = "GA03001";
            this.ddlProvince.DataBind();
            this.ddlProvince.Items.Insert(0, new ListItem("请选择", ""));

            //获取销售员
            UserBase _UserBase = new UserBase();

            _UserBase = Session["USER_SESSION"] as UserBase;
            DataTable dtUA01 = _UserBLL.SelectUserBaseByArea(_UserBase.UA01013);

            this.ddltSalesName.DataSource     = dtUA01;
            this.ddltSalesName.DataTextField  = "UA01005";
            this.ddltSalesName.DataValueField = "UA01001";
            this.ddltSalesName.DataBind();
            this.ddltSalesName.Items.Insert(0, new ListItem("请选择", ""));
        }
示例#6
0
        /// <summary>
        /// 绑定页面的DropDownList
        /// </summary>
        private void BindDll()
        {
            #region 省市
            //获取省
            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();

            this.ddlGA03Province.DataSource     = dtGA03;
            this.ddlGA03Province.DataTextField  = "GA03002";
            this.ddlGA03Province.DataValueField = "GA03001";
            this.ddlGA03Province.DataBind();
            this.ddlGA03Province.Items.Insert(0, new ListItem("请选择", ""));

            //为市添加请选择选项
            this.ddlGA03City.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 客户类型
            DataTable dtCB01 = _CustomerBLL.SelectCustomerType();
            this.ddlCA01016.DataSource     = dtCB01;
            this.ddlCA01016.DataTextField  = "CB01002";
            this.ddlCA01016.DataValueField = "CB01001";
            this.ddlCA01016.DataBind();
            this.ddlCA01016.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 客户代码
            DataTable dtCB02 = _CustomerBLL.SelectCustomerCode();
            this.ddlCA01018.DataSource     = dtCB02;
            this.ddlCA01018.DataTextField  = "CB02002";
            this.ddlCA01018.DataValueField = "CB02001";
            this.ddlCA01018.DataBind();
            this.ddlCA01018.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 行业分类代码、行业代码
            //行业分类
            DataTable dtCB03 = _CustomerBLL.SelectCustomerTradeType();
            this.ddlCA01019.DataSource     = dtCB03;
            this.ddlCA01019.DataTextField  = "CB03002";
            this.ddlCA01019.DataValueField = "CB03001";
            this.ddlCA01019.DataBind();
            this.ddlCA01019.Items.Insert(0, new ListItem("请选择", ""));
            //行业代码
            this.ddlCA01020.Items.Insert(0, new ListItem("请选择", ""));
            #endregion

            #region 240电子
            DataTable dtGA05 = _CustomerBLL.SelectElectronType();
            this.ddlCA01022.DataSource     = dtGA05;
            this.ddlCA01022.DataTextField  = "GA05003";
            this.ddlCA01022.DataValueField = "GA05001";
            this.ddlCA01022.DataBind();
            this.ddlCA01022.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 220汽车
            DataTable dtGA06 = _CustomerBLL.SelectAuteType();
            this.ddlCA01023.DataSource     = dtGA06;
            this.ddlCA01023.DataTextField  = "GA06003";
            this.ddlCA01023.DataValueField = "GA06001";
            this.ddlCA01023.DataBind();
            this.ddlCA01023.Items.Insert(0, new ListItem("请选择", ""));

            #endregion
        }
示例#7
0
        /// <summary>
        /// 绑定页面的DropDownList
        /// </summary>
        private void BindPage()
        {
            #region 分享省份

            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();
            this.ddlOA01055.DataSource     = dtGA03;
            this.ddlOA01055.DataTextField  = "GA03002";
            this.ddlOA01055.DataValueField = "GA03001";
            this.ddlOA01055.DataBind();
            this.ddlOA01055.Items.Insert(0, new ListItem("请选择", ""));

            this.ddlOA01056.DataSource     = dtGA03;
            this.ddlOA01056.DataTextField  = "GA03002";
            this.ddlOA01056.DataValueField = "GA03001";
            this.ddlOA01056.DataBind();
            this.ddlOA01056.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 销售员

            UserBase  _UserBase = Session["USER_SESSION"] as UserBase;
            DataTable dt1;
            if (_UserBase.UA01013 != "全区域")
            {
                dt1 = _OrderBLL.SelectUserBaseByEara(_UserBase.UA01013); //所属区域
            }
            else
            {
                dt1 = _OrderBLL.SelectUserBaseByEara();
            }

            if (dt1.Rows.Count > 0)
            {
                this.ddlUA01.DataSource     = dt1;
                this.ddlUA01.DataTextField  = "UA01005";
                this.ddlUA01.DataValueField = "UA01001";
                this.ddlUA01.DataBind();
                this.ddlUA01.Items.Insert(0, new ListItem("请选择", ""));
            }

            #endregion

            #region 应用代码

            DataTable dt = _OrderBLL.SelectACCode();   //查询应用代码
            if (dt.Rows.Count > 0)
            {
                this.ddlOA01025.DataSource     = dt;
                this.ddlOA01025.DataTextField  = "OB02002";
                this.ddlOA01025.DataValueField = "OB02001";
                this.ddlOA01025.DataBind();
                this.ddlOA01025.Items.Insert(0, new ListItem("请选择", ""));
            }

            #endregion

            #region 应用描述 、客户姓名

            DataTable dtCA01 = _CustomerBLL.SelectCustomerBase(string.Format(" AND CA01001 = '{0}'", Request.QueryString["CA01001"]));
            if (dtCA01.Rows.Count < 1)
            {
                throw new Exception();
            }

            this.labOP01002.InnerText = dtCA01.Rows[0]["CA01003"].ToString();

            DataTable dtOD01 = _OrderBLL.SelectApplicationDescription(string.Format(" AND OD01002 = '{0}'", dtCA01.Rows[0]["CA01020"]));
            this.ddlOA01047.DataSource     = dtOD01;
            this.ddlOA01047.DataTextField  = "OD01003";
            this.ddlOA01047.DataValueField = "OD01001";
            this.ddlOA01047.DataBind();
            this.ddlOA01047.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 加载 系统/喷嘴-最后一张订单号

            DataTable dtAutojet = _OrderBLL.SelectOrderBaseByAutojet((Session["USER_SESSION"] as UserBase).UA01013);
            this.labOA01006.Text = dtAutojet.Rows.Count > 0 ? dtAutojet.Rows[0]["OA01002"].ToString() : "无";

            DataTable dtNozzle = _OrderBLL.SelectOrderBaseByNozzle((Session["USER_SESSION"] as UserBase).UA01013);
            this.labOA01007.Text = dtNozzle.Rows.Count > 0 ? dtNozzle.Rows[0]["OA01002"].ToString() : "无";

            #endregion
        }
示例#8
0
        /// <summary>
        /// 绑定页面查询条件Dll
        /// </summary>
        private void BindDll()
        {
            //获取省
            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();

            this.ddlGA03Province.DataSource     = dtGA03;
            this.ddlGA03Province.DataTextField  = "GA03002";
            this.ddlGA03Province.DataValueField = "GA03001";
            this.ddlGA03Province.DataBind();
            this.ddlGA03Province.Items.Insert(0, new ListItem("请选择", ""));

            //为新增弹层的省市下拉绑定
            this.ddlGA03ProvinceDialog.DataSource     = dtGA03;
            this.ddlGA03ProvinceDialog.DataTextField  = "GA03002";
            this.ddlGA03ProvinceDialog.DataValueField = "GA03001";
            this.ddlGA03ProvinceDialog.DataBind();
            this.ddlGA03ProvinceDialog.Items.Insert(0, new ListItem("请选择", ""));

            this.ddlGA03CityDialog.Items.Insert(0, new ListItem("请选择", ""));

            ////为市添加请选择选项
            //if (!string.IsNullOrEmpty(Request.QueryString["ProvinceId"]))
            //{
            //    //获取省
            //    DataTable dtGA03City = _AreaBLL.SelectSystemAreaForCity(Request.QueryString["ProvinceId"]);

            //    this.ddlGA03City.DataSource = dtGA03City;
            //    this.ddlGA03City.DataTextField = "GA03002";
            //    this.ddlGA03City.DataValueField = "GA03001";
            //    this.ddlGA03City.DataBind();

            //    this.ddlGA03Province.SelectedValue = Request.QueryString["ProvinceId"];
            //    this.ddlGA03City.SelectedValue = Request.QueryString["cityId"];
            //}
            //this.ddlGA03City.Items.Insert(0, new ListItem("请选择", ""));

            //实例化行业代码逻辑层
            UserBLL _UserBLL = new UserBLL();

            //获取销售员
            UserBase _UserBase = new UserBase();

            _UserBase = Session["USER_SESSION"] as UserBase;
            DataTable dtUA01 = _UserBLL.SelectUserBaseByArea(_UserBase.UA01013);

            this.ddlUA01.DataSource     = dtUA01;
            this.ddlUA01.DataTextField  = "UA01005";
            this.ddlUA01.DataValueField = "UA01001";
            this.ddlUA01.DataBind();
            this.ddlUA01.Items.Insert(0, new ListItem("请选择", ""));


            //获取AC选择
            DataTable dtOB02 = _OrderBLL.SelectACCode();

            this.ddlOB02.DataSource     = dtOB02;
            this.ddlOB02.DataTextField  = "OB02002";
            this.ddlOB02.DataValueField = "OB02001";
            this.ddlOB02.DataBind();
            this.ddlOB02.Items.Insert(0, new ListItem("请选择", ""));
        }
示例#9
0
        /// <summary>
        /// 绑定页面的DropDownList
        /// </summary>
        private void BindPage()
        {
            #region 分享省份

            DataTable dtGA03 = _AreaBLL.SelectSystemAreaForProvince();
            this.ddlOA01055.DataSource     = dtGA03;
            this.ddlOA01055.DataTextField  = "GA03002";
            this.ddlOA01055.DataValueField = "GA03001";
            this.ddlOA01055.DataBind();
            this.ddlOA01055.Items.Insert(0, new ListItem("请选择", ""));

            this.ddlOA01056.DataSource     = dtGA03;
            this.ddlOA01056.DataTextField  = "GA03002";
            this.ddlOA01056.DataValueField = "GA03001";
            this.ddlOA01056.DataBind();
            this.ddlOA01056.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 销售员

            UserBase  _UserBase = Session["USER_SESSION"] as UserBase;
            DataTable dt1;
            if (_UserBase.UA01013 != "全区域")
            {
                dt1 = _OrderBLL.SelectUserBaseByEara(_UserBase.UA01013); //所属区域
            }
            else
            {
                dt1 = _OrderBLL.SelectUserBaseByEara();
            }

            if (dt1.Rows.Count > 0)
            {
                this.ddlUA01.DataSource     = dt1;
                this.ddlUA01.DataTextField  = "UA01005";
                this.ddlUA01.DataValueField = "UA01001";
                this.ddlUA01.DataBind();
                this.ddlUA01.Items.Insert(0, new ListItem("请选择", ""));
            }
            #endregion

            #region 应用代码

            DataTable dt = _OrderBLL.SelectACCode();   //查询应用代码
            if (dt.Rows.Count > 0)
            {
                this.ddlOA01025.DataSource     = dt;
                this.ddlOA01025.DataTextField  = "OB02002";
                this.ddlOA01025.DataValueField = "OB02001";
                this.ddlOA01025.DataBind();
                this.ddlOA01025.Items.Insert(0, new ListItem("请选择", ""));
            }

            #endregion

            #region 应用描述 、客户姓名

            DataTable dtCA01 = _CustomerBLL.SelectCustomerBase(string.Format(" AND CA01001 = '{0}'", Request.QueryString["CA01001"]));
            if (dtCA01.Rows.Count < 1)
            {
                throw new Exception();
            }

            this.labCA01003.Text      = dtCA01.Rows[0]["CA01003"].ToString();
            this.labOP01002.InnerText = dtCA01.Rows[0]["CA01003"].ToString();

            #region 客户地址
            this.txtOA01028.Text = dtCA01.Rows[0]["CA01048"].ToString();  //发货地址 --
            this.txtOA01029.Text = dtCA01.Rows[0]["CA01049"].ToString();  //收货人   --
            this.txtOA01030.Text = dtCA01.Rows[0]["CA01010"].ToString();  //货人电话
            this.txtOA01031.Text = dtCA01.Rows[0]["CA01012"].ToString();  //收货邮编
            this.txtOA01032.Text = dtCA01.Rows[0]["CA01050"].ToString();  //寄发票地址  --
            this.txtOA01033.Text = dtCA01.Rows[0]["CA01051"].ToString();  //收发票人  --
            this.txtOA01034.Text = dtCA01.Rows[0]["CA01010"].ToString();  //收发票电话
            this.txtOA01035.Text = dtCA01.Rows[0]["CA01012"].ToString();  //收发票邮编
            #endregion


            string strSql = string.Format(" AND OD01002={0} ", dtCA01.Rows[0]["CA01020"].ToString());
            this.ddlOA01047.DataSource     = _OrderBLL.SelectApplicationDescription(strSql);
            this.ddlOA01047.DataTextField  = "OD01003";
            this.ddlOA01047.DataValueField = "OD01001";
            this.ddlOA01047.DataBind();
            this.ddlOA01047.Items.Insert(0, new ListItem("请选择", ""));

            #endregion

            #region 加载 系统/喷嘴-最后一张订单号

            DataTable dtAutojet = _OrderBLL.SelectOrderBaseByAutojet((Session["USER_SESSION"] as UserBase).UA01013);
            this.labOA01006.Text = dtAutojet.Rows.Count > 0 ? dtAutojet.Rows[0]["OA01002"].ToString() : "无";

            DataTable dtNozzle = _OrderBLL.SelectOrderBaseByNozzle((Session["USER_SESSION"] as UserBase).UA01013);
            this.labOA01007.Text = dtNozzle.Rows.Count > 0 ? dtNozzle.Rows[0]["OA01002"].ToString() : "无";

            #endregion

            #region 根据客户查询最后一张订单

            DataTable dtCustomer = _OrderBLL.SelectOrderBaseByCustomer(Request.QueryString["CA01001"]);
            string    message    = "当前客户是否为Dormant Customers?";
            if (dtCustomer.Rows.Count > 0)
            {
                message += "最后一张下单时间:" + dtCustomer.Rows[0]["OA01009"];
                new Sinoo.Common.MessageShow().CommonMessage(this, message);
            }

            #endregion
        }