Пример #1
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        internal void Bind()
        {
            WareHouse wareHouse = autofacConfig.wareHouseService.GetByWareID(WAREID);

            title1.TitleText = wareHouse.NAME;

            List <WHStorageType> WHSTlist = autofacConfig.wareHouseService.GetSTByWareID(WAREID);

            if (WHSTlist.Count > 0)
            {
                lvWHStorageType.DataSource = WHSTlist;
                lvWHStorageType.DataBind();
            }
            foreach (ListViewRow Row in lvWHStorageType.Rows)
            {
                frmWHSTLayout Layout   = Row.Control as frmWHSTLayout;
                svEnable      svLayout = ((frmWHSTLayout)Row.Control).svRow.RightControl as svEnable;
                if (Layout.lblNext.BindDataValue.ToString() == "0")
                {
                    svLayout.btnEnable.Text      = "启用";
                    svLayout.btnEnable.BackColor = System.Drawing.Color.FromArgb(43, 140, 255);
                    Layout.lblName.ForeColor     = System.Drawing.Color.FromArgb(230, 230, 230);
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 数据加载
        /// </summary>
        internal void Bind()
        {
            AssetsType assetsType = autofacConfig.assTypeService.GetByID(ID);

            title1.TitleText = assetsType.NAME;

            List <AssetsType> assetsTypeList = autofacConfig.assTypeService.GetByLevelAndParentId(2, ID);

            if (assetsTypeList.Count > 0)
            {
                lvSecondLevel.DataSource = assetsTypeList;
                lvSecondLevel.DataBind();
            }
            foreach (ListViewRow Row in lvSecondLevel.Rows)
            {
                frmATFirstLevelLayout Layout = Row.Control as frmATFirstLevelLayout;
                svEnable svLayout            = ((frmATFirstLevelLayout)Row.Control).svRow.RightControl as svEnable;
                if (Layout.lblNext.BindDataValue.ToString() == "0")
                {
                    svLayout.btnEnable.Text      = "启用";
                    svLayout.btnEnable.BackColor = System.Drawing.Color.FromArgb(43, 140, 255);
                    Layout.lblName.ForeColor     = System.Drawing.Color.FromArgb(230, 230, 230);
                }
            }
        }
Пример #3
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        internal void Bind()
        {
            List <WareHouse> wareHousList = autofacConfig.wareHouseService.GetAllWareHouse();

            if (wareHousList.Count > 0)
            {
                lvWareHouse.DataSource = wareHousList;
                lvWareHouse.DataBind();
            }
            foreach (ListViewRow Row in lvWareHouse.Rows)
            {
                frmWHLayout Layout   = Row.Control as frmWHLayout;
                svEnable    svLayout = ((frmWHLayout)Row.Control).svRow.RightControl as svEnable;
                if (Layout.lblNext.BindDataValue.ToString() == "0")
                {
                    svLayout.btnEnable.Text      = "启用";
                    svLayout.btnEnable.BackColor = System.Drawing.Color.FromArgb(43, 140, 255);
                    Layout.lblName.ForeColor     = System.Drawing.Color.FromArgb(230, 230, 230);
                }
            }
        }