Beispiel #1
0
        public ucEditRegion()
        {
            InitializeComponent();

            this.bEditRegion.Properties.ReadOnly = true;
            this.bEditRegion.BackColor           = Color.White;
            _SelectRegionLevel            = BEGIN_LEVEL;
            _CurRegionEditInfo            = new RegionEditInfo();
            this.bEditRegion.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(bEditRegion_ButtonClick);
        }
Beispiel #2
0
        public FrmEditRegion(ucEditRegion ucRegion)
        {
            InitializeComponent();

            _UcRegion      = ucRegion;
            _CurRegionEdit = ucRegion.CurRegionEditInfo;

            this.Load            += new EventHandler(FrmEditRegion_Load);
            this.btnReturn.Click += new EventHandler(btnReturn_Click);
            this.btnClose.Click  += new EventHandler(btnClose_Click);
        }
Beispiel #3
0
        public void InitControlData()
        {
            _BaseDataBindingEdit = getDirectnessBaseEdit(this);

            if (_BaseDataBindingEdit != null)
            {
                RegionEditInfo regionEditInfo    = this.CurRegionEditInfo;
                object         currentEditEntity = _BaseDataBindingEdit.CurrentEditEntity;

                object country = MyReflection.Instance.InvokePropertyForGet(currentEditEntity, Country.ColumnName);
                if (country != null)
                {
                    regionEditInfo.Country = country.ToString();
                }
                else
                {
                    regionEditInfo.Country = null;
                }

                object province = MyReflection.Instance.InvokePropertyForGet(currentEditEntity, Province.ColumnName);
                if (province != null)
                {
                    regionEditInfo.Province = province.ToString();
                }
                else
                {
                    regionEditInfo.Province = null;
                }

                object city = MyReflection.Instance.InvokePropertyForGet(currentEditEntity, City.ColumnName);
                if (city != null)
                {
                    regionEditInfo.City = city.ToString();
                }
                else
                {
                    regionEditInfo.City = null;
                }

                object district = MyReflection.Instance.InvokePropertyForGet(currentEditEntity, District.ColumnName);
                if (district != null)
                {
                    regionEditInfo.District = district.ToString();
                }
                else
                {
                    regionEditInfo.District = null;
                }

                this.CurRegionEditInfo = regionEditInfo;
            }

            SetCtrlReadOnly();
        }