Ejemplo n.º 1
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFactoryRoom.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);

            if (dt != null && dt.Rows.Count > 0)
            {
                this.lueFactoryRoom.Properties.Items.Clear();
                foreach (DataRow dr in dt.Rows)
                {
                    string locationame = Convert.ToString(dr[FMM_LOCATION_FIELDS.FIELD_LOCATION_NAME]);
                    string locationkey = Convert.ToString(dr[FMM_LOCATION_FIELDS.FIELD_LOCATION_KEY]);

                    this.lueFactoryRoom.Properties.Items.Add(locationkey.Trim(), locationame);
                }

                this.repository_LocationName.DataSource    = dt;
                this.repository_LocationName.DisplayMember = FMM_LOCATION_FIELDS.FIELD_LOCATION_NAME;
                this.repository_LocationName.ValueMember   = FMM_LOCATION_FIELDS.FIELD_LOCATION_NAME;
            }
            else
            {
                this.lueFactoryRoom.Properties.Items.Clear();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFactoryRoom.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);

            if (dt != null)
            {
                this.lueFactoryRoom.Properties.DataSource    = dt;
                this.lueFactoryRoom.Properties.DisplayMember = "LOCATION_NAME";
                this.lueFactoryRoom.Properties.ValueMember   = "LOCATION_KEY";
                if (dt.Rows.Count > 0)
                {
                    this.lueFactoryRoom.EditValue = dt.Rows[0]["LOCATION_KEY"].ToString();
                }
            }
            else
            {
                this.lueFactoryRoom.Properties.DataSource = null;
                this.lueFactoryRoom.EditValue             = string.Empty;
            }
            //禁用领料车间
            if (dt == null || dt.Rows.Count <= 1)
            {
                this.lueFactoryRoom.Properties.ReadOnly = true;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFac.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);
            DataRow   dr       = dt.NewRow();

            dr["LOCATION_NAME"] = "";
            dt.Rows.Add(dr);
            if (dt != null)
            {
                this.lueFac.Properties.DataSource    = dt;
                this.lueFac.Properties.DisplayMember = "LOCATION_NAME";
                this.lueFac.Properties.ValueMember   = "LOCATION_KEY";
                if (dt.Rows.Count > 0)
                {
                    this.lueFac.ItemIndex = 0;
                }
            }
            else
            {
                this.lueFac.Properties.DataSource = null;
                this.lueFac.EditValue             = string.Empty;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 绑定工厂车间名称
        /// </summary>
        private void BindFactoryRoom()
        {
            string    lines = PropertyService.Get(PROPERTY_FIELDS.LINES);//拥有权限的线上仓。
            DataTable dt    = FactoryUtils.GetFactoryRoomByLines(lines);

            //绑定工厂车间数据到窗体控件。
            if (dt != null)
            {
                this.cbFactoryRoom.Properties.DataSource    = dt;
                this.cbFactoryRoom.Properties.DisplayMember = "LOCATION_NAME";
                this.cbFactoryRoom.Properties.ValueMember   = "LOCATION_KEY";
                this.cbFactoryRoom.ItemIndex = 0;
            }
            else
            {
                this.cbFactoryRoom.Properties.DataSource = null;
                this.cbFactoryRoom.EditValue             = string.Empty;
            }
            //禁用车间
            if (dt != null && dt.Rows.Count == 1)
            {
                this.cbFactoryRoom.Properties.ReadOnly = true;
                this.cbFactoryRoom.Visible             = false;
                this.lciFactoryRoom.Visibility         = LayoutVisibility.Never;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFactoryRoom.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);

            if (dt != null && dt.Rows.Count > 0)
            {
                this.lueFactoryRoom.Properties.DisplayMember = FMM_LOCATION_FIELDS.FIELD_LOCATION_NAME;
                this.lueFactoryRoom.Properties.ValueMember   = FMM_LOCATION_FIELDS.FIELD_LOCATION_KEY;
                this.lueFactoryRoom.Properties.DataSource    = dt;
                this.lueFactoryRoom.ItemIndex = 0;
            }
            else
            {
                this.lueFactoryRoom.EditValue = string.Empty;
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom(LookUpEdit lueFactory)
        {
            lueFactory.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);

            if (dt != null)
            {
                lueFactory.Properties.DataSource    = dt;
                lueFactory.Properties.DisplayMember = "LOCATION_NAME";
                lueFactory.Properties.ValueMember   = "LOCATION_KEY";
                if (dt.Rows.Count > 0)
                {
                    lueFactory.ItemIndex = 0;
                }
            }
            else
            {
                lueFactory.Properties.DataSource = null;
                lueFactory.EditValue             = string.Empty;
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 绑定车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFactoryRoom.EditValue = string.Empty;
            string strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);

            System.Data.DataTable dt = FactoryUtils.GetFactoryRoomByLines(strLines);
            if (dt != null)
            {
                this.lueFactoryRoom.Properties.DataSource    = dt;
                this.lueFactoryRoom.Properties.DisplayMember = "LOCATION_NAME";
                this.lueFactoryRoom.Properties.ValueMember   = "LOCATION_KEY";
                this.lueFactoryRoom.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("LOCATION_NAME"));
                if (dt.Rows.Count > 0)
                {
                    this.lueFactoryRoom.EditValue = dt.Rows[0]["LOCATION_KEY"].ToString();
                }
            }
            else
            {
                this.lueFactoryRoom.Properties.DataSource = null;
                this.lueFactoryRoom.EditValue             = string.Empty;
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 绑定工厂车间。
        /// </summary>
        private void BindFactoryRoom()
        {
            this.lueFactoryRoom.EditValue = string.Empty;
            string    strLines = PropertyService.Get(PROPERTY_FIELDS.LINES);
            DataTable dt       = FactoryUtils.GetFactoryRoomByLines(strLines);

            //绑定工厂车间数据到窗体控件。
            if (dt != null)
            {
                this.lueFactoryRoom.Properties.DataSource    = dt;
                this.lueFactoryRoom.Properties.DisplayMember = "LOCATION_NAME";
                this.lueFactoryRoom.Properties.ValueMember   = "LOCATION_KEY";
                this.lueFactoryRoom.ItemIndex = 0;
            }
            else
            {
                this.lueFactoryRoom.Properties.DataSource = null;
                this.lueFactoryRoom.EditValue             = string.Empty;
            }
            if (dt == null || dt.Rows.Count <= 1)
            {
                this.lueFactoryRoom.Properties.ReadOnly = true;
            }
        }