/// <summary> /// <auth>XLB</auth> /// <date>2013-04-10</date> ///<purpose>保存方法</purpose> /// </summary> private void SaveIemExcept() { try { List <IemMainPageExcept> iemMainPageExcept = gridControl1.DataSource as List <IemMainPageExcept>; if (iemMainPageExcept == null) { iemMainPageExcept = new List <IemMainPageExcept>(); } int index = 0; iemMainPageExcept.AddRange(iemMainPageExceptDel); foreach (var item in iemMainPageExcept) { item.OrderCode = (++index).ToString();//排序码 sqlUtil = new SqlUti(); sqlUtil.SaveIemMainPageExcept(item); } MessageBox.Show("保存成功"); } catch (Exception ex) { MessageBox.Show("保存失败"); } }
/// <summary> /// 抓取所有数据元 /// <auth>XLB</auth> /// <date>2013-04-10</date> /// </summary> private void GetAllDateElement() { try { sqlUtil = new SqlUti(); List <DateElementEntity> dataList = sqlUtil.GetAllDateElement(); repositoryItemSearchLookUpEdit1.DataSource = dataList; } catch (Exception ex) { throw ex; } }
/// <summary> /// 构造函数 /// </summary> public FormExtension() { try { InitializeComponent(); sqlUtil = new SqlUti(); SetStyle(ControlStyles.UserPaint, true); /*控件自行绘制*/ SetStyle(ControlStyles.AllPaintingInWmPaint, true); /*禁止擦除背景*/ SetStyle(ControlStyles.DoubleBuffer, true); /*双缓冲(绘制在缓冲区进行完成后输出到屏幕上)*/ DS_SqlHelper.CreateSqlHelper(); } catch (Exception ex) { throw ex; } }
/// <summary> /// 初始化列表 /// <auth>XLB</auth> /// <date>2013-04-10</date> /// </summary> private void InitDateList() { try { if (sqlUtil == null) { sqlUtil = new SqlUti(); } Dictionary <string, DateElementEntity> dateElement = sqlUtil.GetDataElement(); List <IemMainPageExcept> iemMainPageList = sqlUtil.GetIemMainPageExcept(dateElement); gridControl1.DataSource = iemMainPageList; GetAllDateElement(); } catch (Exception ex) { throw ex; } }
/// <summary> /// 抓取使用对象集合 /// </summary> private void GetIemMainPageExceptUsePat() { try { if (sqlUtil == null) { sqlUtil = new SqlUti(); } iemExceptUse = sqlUtil.GetIemExceptUse(noofInpat); if (iemExceptUse == null) { iemExceptUse = new List <IemMainPageExceptUse>(); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 重载构造 /// </summary> /// <param name="noofpat">病案号</param> public FormExtension(string noofpat) : this() { try { this.noofInpat = noofpat; sqlUtil = new SqlUti(); InitIemExcept(); GetIemMainPageExceptUsePat(); InitControl(iemExcept, iemExceptUse); SetStyle(ControlStyles.UserPaint, true); /*控件自行绘制*/ SetStyle(ControlStyles.AllPaintingInWmPaint, true); /*禁止擦除背景*/ SetStyle(ControlStyles.DoubleBuffer, true); /*双缓冲(绘制在缓冲区进行完成后输出到屏幕上)*/ RegisterEvent(); /*注册事件*/ DS_SqlHelper.CreateSqlHelper(); } catch (Exception ex) { throw ex; } }