添加 or 修改 的一个处理方式
2007-04-09 10:17
302 查看
/// <summary>
/// 添加 or修改的标志变量
/// </summary>
private int operFlag=0;
public int OperFlag
{
set
{
operFlag= value;
if(operFlag==0)
{
this.btnModify.Visible=false;
this.btnSure.Visible=true;
}
else if(operFlag==1)
{
this.btnModify.Visible=true;
this.btnSure.Visible=false;
}
}
}
调用时指定 OperFlag = 0 or 1 就可以确定是添加 还是 修改。
/// 添加 or修改的标志变量
/// </summary>
private int operFlag=0;
public int OperFlag
{
set
{
operFlag= value;
if(operFlag==0)
{
this.btnModify.Visible=false;
this.btnSure.Visible=true;
}
else if(operFlag==1)
{
this.btnModify.Visible=true;
this.btnSure.Visible=false;
}
}
}
调用时指定 OperFlag = 0 or 1 就可以确定是添加 还是 修改。
相关文章推荐
- ASP一个网页处理所有问题(添加,修改,删除,列表)框架
- 向记事本里写入数据、一个修改密码的判断方法(用记录本处理密码的方式)
- 长按桌面进入小部件,选择“设置快捷方式”里任意一个添加到桌面,在设置中将语音设置为英语,添加的快捷方式依然是中文
- ruby处理字符串数组的添加和删除,每增加一个服务类型,则增加一个相应的值。
- 关于表格动态添加行并处理相关表单元素的一些修改----优化for重用(1)
- 映射的方式实现一个servlet类处理多个请求
- 修改应用程序的图标和在工具栏添加一个按钮
- 写一个脚本 通过字符菜单方式添加和删除用户
- SharePoint中添加或者修改Item时调用EventReceiver(Event Handler)处理额外的逻辑
- 一个修改RAC REDO引起的DATAGUARD错误 的处理
- MFC VC++下ADO方式访问连接MySQL数据库 添加 删除 修改数据库
- 用C语言模拟实现一个通讯录,要求实现其添加、删除、修改、查找、显示和排序联系人信息的功能
- 针对这一段时间ASP.NET版中比较集中突出的问题,我写了一个完整的页面,包含显示/修改/删除/添加/排序/合并/写文件/显示图片或文档,有详细代码注释
- C# DAL添加数据的两种处理方式
- 如果在数据库中修改数据库, 添加一个主键约束?
- HOWTO:InstallShield中添加一个卸载快捷方式或设置反卸载 - DISK1TARGET
- delegate() 方法为指定的元素(属于被选元素的子元素)添加一个或多个事件处理程序,并规定当这些事件发生时运行的函数。 使用 delegate() 方法的事件处理程序适用于当前或未来的元素(比如
- 为extjs的TabPanel 添加右键关闭效果(修改一个bug)
- DOM中为事件添加事件处理程序的几种方式以及跨浏览器方式
- windows下修改注册表,添加鼠标右键的快捷方式