您的位置:首页 > 其它

添加 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 就可以确定是添加 还是 修改。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐