public FrmEdtBody(Int64 id) { InitializeComponent(); //string sPwd = Des.Decrypt(ClsFrmMng.KEY, ConfigurationManager.AppSettings["DbPwd"]); db = new Database("XE"); _id = id; bodyHis = db.Single<BODY_CHECK_HISTORY>("where ID = @0", _id); bODYCHECKHISTORYBindingSource.DataSource = bodyHis; vALUECODEBindingSource.DataSource = db.Fetch<VALUE_CODE>("where groupName = 208"); }
private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (XtraMessageBox.Show("确定保存该患者基本信息?", "操作确认", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK) { bODYCHECKHISTORYBindingSource.EndEdit(); bODYCHECKHISTORYBindingSource.CurrencyManager.EndCurrentEdit(); try { bodyHis.LOG_TIME = DateTime.Now; db.Insert(bodyHis); bodyHis = new BODY_CHECK_HISTORY(); bodyHis.REG_ID = _regID; bodyHis.BASE_INFO_ID = _baseID; bodyHis.OPERATOR = ClsFrmMng.WorkerID; bODYCHECKHISTORYBindingSource.DataSource = bodyHis; if (NewRegistEvt != null) NewRegistEvt(); } catch (Exception err) { XtraMessageBox.Show(err.Message, "错误提示", MessageBoxButtons.OK); } } }