private void btnCfgLoad_Click(object sender, EventArgs e) { try { SysInfoDao dao = new SysInfoDao(); SysInfo info = new SysInfo(); info = dao.GetSysInfo(ConstDef.SysInfoHospital); txtHospital.Text = info.FieldName; info = dao.GetSysInfo(ConstDef.SysInfoImagePath); txtImagePath.Text = info.FieldName; info = dao.GetSysInfo(ConstDef.SysInfoMicroType); txtMicroscope.Text = info.FieldName; info = dao.GetSysInfo(ConstDef.SysInfoLensPara); txtLensPara.Text = info.FieldName; info = dao.GetSysInfo(ConstDef.SysInfoCameraPara); txtCameraPara.Text = info.FieldName; } catch (Exception ex) { LogHelper.AppLoger.Error(ex); } }
public ConfigForm() { InitializeComponent(); SysInfoDao SysInfodao = new SysInfoDao(); SysInfo info = SysInfodao.GetSysInfo(ConstDef.SysInfoImagePath); ConstDef.ImagePath = info.FieldName; dgvUser.AutoGenerateColumns = false; }
private bool SaveSysConfig(SysInfo info) { bool ret = false; SysInfoDao dao = new SysInfoDao(); if (dao.GetSysInfo(info.FieldId) != null) { if (!dao.Update(info)) { return(ret); } } else { if (!dao.Insert(info)) { return(ret); } } return(true); }