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

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

            vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 193);                  // 通路类型
            vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 44);                  // 透析器型号

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

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

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

            v = new PATIENT_COURSE();
            pATIENTCOURSEBindingSource.DataSource = v;
        }