VS2005winform程序中获取用户控件的值
来源:互联网 发布:微信公众平台网页源码 编辑:程序博客网 时间:2024/05/29 07:35
//在用户控件中定义public变量和属性,这样在调用窗体中就可以方便的使用用户控件的值
foreach (Control ctr in panel_fill.Controls)
{
UserControl_TJ_ResultsEntry uctre = null;//用户控件
if (ctr.GetType() == typeof(UserControl_TJ_ResultsEntry))
{
uctre = ctr as UserControl_TJ_ResultsEntry;
int i_all = 0;
for (int j = 0; j < uctre.itemchange_group_dt.Rows.Count; j++)
{
DataRow item_row = uctre.itemchange_group_dt.Rows[j];//用户控件中定义的public表
string str_state = item_row["State"] == null ? "" : item_row["State"].ToString();
if (str_state == "已检")
i_all++;
bll_itemresult.UpdateResultByGUID(item_row["GUID"].ToString(), item_row["Result"].ToString(), str_state);
}
//根据体检id和组合id更新组合检验状态0,1,2,3
if (i_all == uctre.itemchange_group_dt.Rows.Count)
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "3", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);//GROUP_DOCTORID,GROUP_DOCTORNAME用户控件中定义的属性
else if (i_all > 0 && i_all < uctre.itemchange_group_dt.Rows.Count)
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "2", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);
else
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "1", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);
}
}
foreach (Control ctr in panel_fill.Controls)
{
UserControl_TJ_ResultsEntry uctre = null;//用户控件
if (ctr.GetType() == typeof(UserControl_TJ_ResultsEntry))
{
uctre = ctr as UserControl_TJ_ResultsEntry;
int i_all = 0;
for (int j = 0; j < uctre.itemchange_group_dt.Rows.Count; j++)
{
DataRow item_row = uctre.itemchange_group_dt.Rows[j];//用户控件中定义的public表
string str_state = item_row["State"] == null ? "" : item_row["State"].ToString();
if (str_state == "已检")
i_all++;
bll_itemresult.UpdateResultByGUID(item_row["GUID"].ToString(), item_row["Result"].ToString(), str_state);
}
//根据体检id和组合id更新组合检验状态0,1,2,3
if (i_all == uctre.itemchange_group_dt.Rows.Count)
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "3", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);//GROUP_DOCTORID,GROUP_DOCTORNAME用户控件中定义的属性
else if (i_all > 0 && i_all < uctre.itemchange_group_dt.Rows.Count)
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "2", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);
else
bll_itemgroup.UpdateGroupByTIDandGID(this.Current_TJ_ID, uctre.itemchange_group_dt.Rows[0]["GroupID"].ToString(), "1", Convert.ToDateTime(uctre.GROUP_TJ_TIME), uctre.GROUP_DOCTORID, uctre.GROUP_DOCTORNAME);
}
}
0 0
- VS2005winform程序中获取用户控件的值
- 关于.net中获取用户控件的值的问题
- 在javascript中获取用户控件里的子控件的值
- ASP.NET 中页面获取所用用户控件的事件
- 获取 asp.net用户控件里的控件值?
- .net中获取或设置用户自定义控件值的方法
- umbraco 用户控件中 使用内置函数获取值
- Window Service程序中如何获取登陆用户的信息
- 关于页面中获取用户控件中的控件 事件的方法
- 关于页面中获取用户控件中的控件事件的方法
- 获取web 用户控件里的treeview 值
- 用户控件中控件名称的提示
- 在JS中获取控件的值
- 获取repeater中控件的值
- ASP.NET中获取控件的值
- easyUI中获取控件的值
- JavaScript获取GridView中用户点击控件的行号,列号
- 小程序中关于app.js中用户的调用与获取unionid
- QSlider进度条
- Android Fragment完全解析
- 单纯p2p理财模式难以发展壮大和长久存在!
- 黑马程序员--IO流操作(1)
- 子类不能继承或覆盖父类的private方法
- VS2005winform程序中获取用户控件的值
- PBOC/EMV通讯中常用标签
- HOG特征详解
- 2014年5月16日
- 2014年5月16日
- 安卓Android ROM定制、移植,安卓软件反编译、汉化实战教程第七篇:ROM单刷包的制作即刷机语法
- 安卓Android ROM定制、移植,安卓软件反编译、汉化实战教程第六篇:boot.img、recovery.img的解包、打包!
- 安卓Android ROM定制、移植,安卓软件反编译、汉化实战教程第六篇:boot.img、recovery.img的解包、打包!
- 安卓Android ROM定制、移植,安卓软件反编译、汉化实战教程第三篇:厨房环境Cygwin设置。