public FrmEdtDiagosis_Allergy(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", 147); vALUECODEBindingSource1.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 148); vALUECODEBindingSource2.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 44); vALUECODEBindingSource3.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 149); vALUECODEBindingSource4.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 150); vALUEGROUPBindingSource.DataSource = db.Fetch<VALUE_GROUP>("where FATHERID = @0", 18); vALUECODEBindingSource6.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 152); vALUECODEBindingSource7.DataSource = db.Fetch<VALUE_CODE>("where groupName = @0", 153); diag = db.Single<DIAGNOSIS_ALLERGY>("where ID = @0", _id); dIAGNOSISALLERGYBindingSource.DataSource = diag; }
private void SaveData() { dIAGNOSISALLERGYBindingSource.EndEdit(); dIAGNOSISALLERGYBindingSource.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_ALLERGY(); dIAGNOSISALLERGYBindingSource.DataSource = diag; }