public FrmEdtDiagonsis_Complication(Int64 id)
        {
            InitializeComponent();
            db = new Database("XE");
            _id = id;

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

            vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 131);
            vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 132);
            vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 133);
            vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 134);
            vALUECODEBindingSource4.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 135);
            vALUECODEBindingSource5.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 136);
            vALUECODEBindingSource6.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 221);

            diag = db.Single<DIAGNOSIS_COMPLICATION>("where ID = @0", _id);
            dIAGNOSISCOMPLICATIONBindingSource.DataSource = diag;
        }
        private void SaveData()
        {
            dIAGNOSISCOMPLICATIONBindingSource.EndEdit();
            dIAGNOSISCOMPLICATIONBindingSource.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_COMPLICATION();
            dIAGNOSISCOMPLICATIONBindingSource.DataSource = diag;
        }