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

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

            vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 129);
            vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 123);
            vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 124);
            vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 126);
            vALUECODEBindingSource4.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 125);

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