Esempio n. 1
0
        private void BindPropertyGrid()
        {
            DictionaryProperty dis = new DictionaryProperty();

            if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Insert)
            {

                SetPropertyReadOnly(dis, false, "DicKey1", "DicKey2", "DicValue");
            }
            else
            {
                SetPropertyReadOnly(dis, true, "DicKey1", "DicKey2", "DicValue");
            }

            dis.RecordID = this._tmpobjInfo.cmt_iRecordID;
            dis.DicKey1 = this._tmpobjInfo.cmt_cKey1;
            dis.DicKey2 = this._tmpobjInfo.cmt_cKey2;
            dis.DicValue = this._tmpobjInfo.cmt_cValue;
            dis.DicNumber = this._tmpobjInfo.cmt_fNumber;
            dis.DicRemark = this._tmpobjInfo.cmt_cRemark;
            dis.DicRemark2 = this._tmpobjInfo.cmt_cRemark2;
            dis.IsActiveChiness = (DictionaryProperty.YesNO)Enum.Parse(typeof(DictionaryProperty.YesNO), this._tmpobjInfo.cmt_lIsActive ? "是" : "否");
            this.ppgDataDictionary.SelectedObject = dis;
        }
Esempio n. 2
0
        void BindPropertyGrid()
        {
            DictionaryProperty dis = new DictionaryProperty();

            if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Update)
                SetPropertyReadOnly(dis, true, "cMaterialCode", "lSync");
            else
                SetPropertyReadOnly(dis, false, "cMaterialCode", "lSync");

            if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Insert)
            {
                dis.RecordID = Guid.NewGuid().ToString();
                dis.cMaterialCode = "";
                //dis.cMaterialType = this._tmpobjInfo.cmt_cKey2;
                dis.cMaterialName = "";
                dis.cDescription = "";
                dis.lIsDeleted = DictionaryProperty.YesNO.否;// (DictionaryProperty.YesNO)Enum.Parse(typeof(DictionaryProperty.YesNO), this._tmpobjInfo.mlpf_lIsDeleted ? "是" : "否");
                dis.dUpdateTime = DateTime.Now;//this._tmpobjInfo.mlpf_dUpdateTime.Value;
                dis.cMaterialAbbreviation = "";
                //dis.cMaterialBrand = this._tmpobjInfo.mlpf_cDescription;
                //dis.cMaterialUnit = this._tmpobjInfo.mlpf_cMaterialName;
                dis.fMaterialWidth = 0;
                dis.fMaterialLength = 0;
                dis.lSync = DictionaryProperty.YesNO.是;// (DictionaryProperty.YesNO)Enum.Parse(typeof(DictionaryProperty.YesNO), this._tmpobjInfo.mlpf_lSync ? "是" : "否");
                this.ppgDataDictionary.SelectedObject = dis;
                return;
            }

            dis.RecordID = this._tmpobjInfo.mlpf_MLPFID.ToString();
            dis.cMaterialCode = this._tmpobjInfo.mlpf_cMaterialCode;
            dis.cMaterialType = this._tmpobjInfo.mlpf_cMaterialType;
            dis.cMaterialName = this._tmpobjInfo.mlpf_cMaterialName;
            dis.cDescription = this._tmpobjInfo.mlpf_cDescription;
            dis.lIsDeleted = (DictionaryProperty.YesNO)Enum.Parse(typeof(DictionaryProperty.YesNO), this._tmpobjInfo.mlpf_lIsDeleted ? "是" : "否");
            dis.dUpdateTime = this._tmpobjInfo.mlpf_dUpdateTime.Value;
            dis.cMaterialAbbreviation = this._tmpobjInfo.mlpf_cMaterialAbbreviation;
            dis.cMaterialBrand = this._tmpobjInfo.mlpf_cMaterialBrand;
            dis.cMaterialUnit = this._tmpobjInfo.mlpf_cMaterialUnit;
            dis.fMaterialWidth = this._tmpobjInfo.mlpf_fMaterialWidth;
            dis.fMaterialLength = this._tmpobjInfo.mlpf_fMaterialLength;
            dis.lSync = (DictionaryProperty.YesNO)Enum.Parse(typeof(DictionaryProperty.YesNO), this._tmpobjInfo.mlpf_lSync ? "是" : "否");
            this.ppgDataDictionary.SelectedObject = dis;
        }