public FrmEdtDiagonsis_Infe(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", 137); diag = db.Single<DIAGNOSIS_INFECTIOUS_DISEASE>("where ID = @0", _id); dIAGNOSISINFECTIOUSDISEASEBindingSource.DataSource = diag; }
private void SaveData() { dIAGNOSISINFECTIOUSDISEASEBindingSource.EndEdit(); dIAGNOSISINFECTIOUSDISEASEBindingSource.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_INFECTIOUS_DISEASE(); dIAGNOSISINFECTIOUSDISEASEBindingSource.DataSource = diag; }