public FrmEdtDiagosis_Outcome(Int64 id)
        {
            InitializeComponent();

            db = new Database("XE");
            _id = id;

            //ConditionValidationRule ruleNoEmpty = new ConditionValidationRule();
            //ruleNoEmpty.ConditionOperator = ConditionOperator.IsNotBlank;
            //ruleNoEmpty.ErrorText = "该项不能为空。";
            //dxValidationProvider1.SetValidationRule(PRIMARY_DISEAE_TYPETextEdit, ruleNoEmpty);

            // 死亡原因
            vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 242);
            // 心血管事件
            vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 243);
            // 脑管理事件
            vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 244);
            // 感染
            vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 245);

            diag = db.Single<DIAGNOSIS_OUTCOME>("where ID = @0", _id);
            dIAGNOSISOUTCOMEBindingSource.DataSource = diag;
        }
        private void SaveData()
        {
            dIAGNOSISOUTCOMEBindingSource.EndEdit();
            dIAGNOSISOUTCOMEBindingSource.CurrencyManager.EndCurrentEdit();

            diag.PT_ID = _baseID;
            diag.LOG_TIME = DateTime.Now;
            diag.OPERATOR = ClsFrmMng.WorkerID;

            db.Insert(diag);
            if (NewRegistEvt != null)
                NewRegistEvt();

            diag = new DIAGNOSIS_OUTCOME();
            dIAGNOSISOUTCOMEBindingSource.DataSource = diag;
        }