private void buttonX11_Click(object sender, EventArgs e) { if (_cdiobj != null) { var obj = new CP_CDI_TAB(); obj.UPDATE_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); _list.Add(obj); update_time.DataSource = null;//数据源先置空,否则同一个对象不会刷新 update_time.ValueMember = "id"; update_time.DisplayMember = "update_time"; update_time.DataSource = _list; update_time.SelectedIndex = _list.Count - 1; } ss_chbd_df.Text = ""; ss_chbd_p50.Text = ""; ss_chbd_p75.Text = ""; ss_bstgz.Text = ""; ss_etdyr.Text = ""; ddst_grysh.SelectedIndex = 0; ddst_jxydnq.SelectedIndex = 0; ddst_yynq.SelectedIndex = 0; ddst_dydnq.SelectedIndex = 0; checkBox8.Checked = true; }
public void print(bool ispre) { Cursor.Current = Cursors.WaitCursor; CP_CDI_TAB obj = bll.Get(_obj?.ID ?? 0); if (obj == null) { MessageBox.Show("请保存后再预览打印!", "软件提示"); return; } try { TB_CHILDBASE baseobj = new tb_childbasebll().Get(_cpwomeninfo.cd_id); cp_cdi_printer printer = new cp_cdi_printer(baseobj, obj); printer.Print(ispre); } catch (Exception ex) { MessageBox.Show("系统异常,请联系管理员!"); throw ex; } finally { Cursor.Current = Cursors.Default; } }
/// <summary> /// 刷新列表 /// </summary> /// <param name="ID"></param> public void RefreshCode(int id) { Cursor.Current = Cursors.WaitCursor; _cdiobj = cdibll.Get(id, _type); _cdi1obj = cdi1bll.Get(_cpwomeninfo.cd_id, _type, (int)(_cdiobj?.ID ?? 0)); _ddstobj = ddstbll.GetByType(_cpwomeninfo.cd_id, _type, (int)(_cdiobj?.ID ?? 0)); _zqobj = ppvtbll.GetByType(_cpwomeninfo.cd_id, _type, (int)(_cdiobj?.ID ?? 0)); if (_cdiobj != null) { CommonHelper.setForm(_cdiobj, panel1.Controls); ss_chbd_df.Text = _cdiobj.CHBD_DF; ss_chbd_p50.Text = _cdiobj.CHBD_P50; ss_chbd_p75.Text = _cdiobj.CHBD_P75; ss_bstgz.Text = _cdiobj.BSTGZ; ss_etdyr.Text = _cdiobj.ETDYR; } if (_cdi1obj != null) { CommonHelper.setForm(_cdi1obj, panel1.Controls); } if (_ddstobj != null) { CommonHelper.setForm(_ddstobj, panel1.Controls); } if (_zqobj != null) { CommonHelper.setForm(_zqobj, panel1.Controls); } if (_cdiobj == null && _cdi1obj == null && _ddstobj == null && _zqobj == null) { SetDefault(); } Cursor.Current = Cursors.Default; }
//CDI短表(词汇及手势)测试结果 private CP_CDI_TAB getCdiObj() { if (cszqm.Text.Trim() == "") { cszqm.Text = globalInfoClass.UserName; } CP_CDI_TAB cdiobj = CommonHelper.GetObjMenzhen <CP_CDI_TAB>(groupBox2.Controls, _cpwomeninfo.cd_id); cdiobj.TYPE = _type; cdiobj.HOSPITAL = _hospital; cdiobj.CHBD_DF = ss_chbd_df.Text; cdiobj.CHBD_P50 = ss_chbd_p50.Text; cdiobj.CHBD_P75 = ss_chbd_p75.Text; cdiobj.BSTGZ = ss_bstgz.Text; cdiobj.ETDYR = ss_etdyr.Text; cdiobj.CSZQM = cszqm.Text; cdiobj.CSRQ = csrq.Text; cdiobj.SZYS = szys.Text.Trim(); if (_cdiobj != null) { cdiobj.ID = _cdiobj.ID; cdiobj.OPERATE_CODE = _cdiobj.OPERATE_CODE; cdiobj.OPERATE_NAME = _cdiobj.OPERATE_NAME; cdiobj.OPERATE_TIME = _cdiobj.OPERATE_TIME; } return(cdiobj); }
private void buttonX1_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; CP_CDI_TAB cdiobj = getCdiObj(); CP_CDI1_TAB cdi1obj = getCdi1Obj(); CP_DDST_TAB ddstobj = getDdstObj(); CP_PPVT_TAB ppvtobj = getPpvtObj(); bool succ = false; if (cdibll.SaveOrUpdate(cdiobj)) { succ = true; cdi1obj.EXTERNALID = cdiobj.ID; ddstobj.EXTERNALID = cdiobj.ID; ppvtobj.EXTERNALID = cdiobj.ID; } else { succ = false; } if (cdi1bll.SaveOrUpdate(cdi1obj)) { succ = true; } else { succ = false; } if (ddstbll.SaveOrUpdate(ddstobj)) { succ = true; } else { succ = false; } if (ppvtbll.SaveOrUpdate(ppvtobj)) { succ = true; } else { succ = false; } if (succ) { MessageBox.Show("保存成功!"); RefreshRecordList(); update_time.SelectedIndex = _list.IndexOf(_list.FirstOrDefault(t => t.UPDATE_TIME == cdiobj.UPDATE_TIME)); } else { MessageBox.Show("保存失败!"); } Cursor.Current = Cursors.Default; }
public cp_yysc_printer(TB_CHILDBASE baseobj, CP_DDST_TAB ddstobj, CP_CDI_TAB cdiobj, CP_CDI1_TAB cdi1obj, CP_ZQYYFYJC_TAB zqobj) { InitializeComponent(); _baseobj = baseobj; _ddstobj = ddstobj; _cdiobj = cdiobj; _cdi1obj = cdi1obj; _obj = zqobj; }
public cp_yysc1_printer(TB_CHILDBASE baseobj, CP_CDI_TAB cdiobj, CP_DDST_TAB ddstobj, CP_CDI1_TAB cdi1obj, CP_PPVT_TAB ppvtobj) { InitializeComponent(); _baseobj = baseobj; _cdiobj = cdiobj; _ddstobj = ddstobj; _cdi1obj = cdi1obj; _ppvtobj = ppvtobj; }
private void buttonX11_Click(object sender, EventArgs e) { if (_obj != null) { var obj = new CP_CDI_TAB(); obj.UPDATE_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); _list.Add(obj); update_time.DataSource = null;//数据源先置空,否则同一个对象不会刷新 update_time.ValueMember = "id"; update_time.DisplayMember = "update_time"; update_time.DataSource = _list; update_time.SelectedIndex = _list.Count - 1; } }
/// <summary> /// 刷新列表 /// </summary> /// <param name="id"></param> public void RefreshCode(int id) { Cursor.Current = Cursors.WaitCursor; _obj = bll.Get(id); if (_obj != null) { CommonHelper.setForm(_obj, panel1.Controls); } else { SetDefault(); } Cursor.Current = Cursors.Default; }
private void buttonX1_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; CP_CDI_TAB obj = getObj(); if (bll.SaveOrUpdate(obj)) { MessageBox.Show("保存成功!"); RefreshRecordList(); update_time.SelectedIndex = _list.IndexOf(_list.FirstOrDefault(t => t.UPDATE_TIME == obj.UPDATE_TIME)); } else { MessageBox.Show("保存失败!"); } Cursor.Current = Cursors.Default; }
private CP_CDI_TAB getObj() { if (cszqm.Text.Trim() == "") { cszqm.Text = globalInfoClass.UserName; } CP_CDI_TAB obj = CommonHelper.GetObjMenzhen <CP_CDI_TAB>(panel1.Controls, _cpwomeninfo.cd_id); obj.HOSPITAL = _hospital; if (_obj != null) { obj.ID = _obj.ID; obj.OPERATE_CODE = _obj.OPERATE_CODE; obj.OPERATE_NAME = _obj.OPERATE_NAME; obj.OPERATE_TIME = _obj.OPERATE_TIME; } return(obj); }
private CP_CDI_TAB getCdiObj() { if (cszqm.Text.Trim() == "") { cszqm.Text = globalInfoClass.UserName; } CP_CDI_TAB cdiobj = CommonHelper.GetObjMenzhen <CP_CDI_TAB>(groupBox3.Controls, _cpwomeninfo.cd_id); cdiobj.TYPE = _type; cdiobj.HOSPITAL = _hospital; cdiobj.CSZQM = cszqm.Text.Trim(); cdiobj.CSRQ = csrq.Text.Trim(); cdiobj.SZYS = szys.Text.Trim(); if (_cdiobj != null) { cdiobj.ID = _cdiobj.ID; cdiobj.OPERATE_CODE = _cdiobj.OPERATE_CODE; cdiobj.OPERATE_NAME = _cdiobj.OPERATE_NAME; cdiobj.OPERATE_TIME = _cdiobj.OPERATE_TIME; } return(cdiobj); }
public cp_cdi_printer(TB_CHILDBASE baseobj, CP_CDI_TAB obj) { InitializeComponent(); _baseobj = baseobj; _obj = obj; }