发表评论eForm表单操作类
发布时间:2017-05-16 17:56:02
浏览量:1716
eForm表单操作类
| 名称 |
数据类型 |
描述 |
| TableName |
string |
表名 |
| primaryKey |
string |
主键 |
| Fields |
Dictionary |
字段编码及内容集合 |
| FromURL |
string |
来源页面URL |
| ID |
string |
表单ID属性,即操作数据的ID。 |
| eUser |
eUser |
操作用户信息 |
| ActionName |
string |
动作参数名称 |
| Action |
string |
当前动作 |
| Controls |
Dictionary |
表单包含的所有控件
|
| AddControl() |
|
添加控件 |
| AddControl() |
|
添加控件组 |
| LoadAction() |
|
手动执行读取、添加、修改、删除动作。 |
| Handle() |
|
自动处理表单 |
|
| Add() |
|
添加 |
| Update() |
|
更新 |
| Delete() |
|
删除 |
| onChange() |
|
数据改变事件 |
| Redirect() |
|
页面跳转事件 |
使用示例
HTML:
<asp:PlaceHolder ID="eFormControlGroup" runat="server">
姓名:<ev:eFormControl ID="F1" Name="F1" ControlType="text" Field="FullName" Width="300px" FieldName="姓名" NotNull="True" MaxLength="50" runat="server"/>
性别:<ev:eFormControl ID="F2" Name="F2" ControlType="radio" Field="Sex" FieldName="性别" NotNull="True" Options="[{text:男,value:1},{text:女,value:2}]" DefaultValue="1" runat="server"/>
<asp:PlaceHolder>
CS:
eForm eform =
new eForm(
"Demo_Persons");
//eform.AddControl(eFormControlGroup);//一次添加
eform.AddControl(F1);
//分别添加
eform.AddControl(F2);
//分别添加
eform.Handle();