zoukankan
html css js c++ java
接口的使用
好长时间没用了.今年看 petshop 都有点快忘了.....
Account.cs
using
System;
using
System.Reflection;
using
System.Configuration;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Account 的摘要说明。
///
</summary>
public
class
Account
{
public
int
SignIn(
string
userId,
string
password)
{
if
((userId.Trim()
==
string
.Empty)
||
(password.Trim()
==
string
.Empty))
return
10
;
IAccount dal
=
(IAccount)Assembly.Load(
"
Z_Petshop
"
).CreateInstance (
"
Z_Petshop.
"
+
"
Class_Account
"
);
int
account
=
dal.SignIn(userId, password);
return
account;
}
}
}
Class_Account.cs
using
System;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Class_Account 的摘要说明。
///
</summary>
public
class
Class_Account : IAccount
{
public
int
SignIn(
string
userId,
string
password)
{
return
100
;
}
}
}
IAccount.cs
using
System;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Iaccount 的摘要说明。
///
</summary>
public
interface
IAccount
{
int
SignIn(
string
userId,
string
password);
}
}
调用页面
private
void
Page_Load(
object
sender, System.EventArgs e)
{
//
在此处放置用户代码以初始化页面
Account s
=
new
Account ();
int
I
=
s.SignIn (
"
100
"
,
"
100
"
);
this
.Response .Write (I);
}
查看全文
相关阅读:
室内设计师招募中...
winform控件部署于web中控件装载ie中
Oracle10g在windows2003下双机热备安装
购房风波(4)不了了之
[原创]面向对象理解·抽象类和派生类理解和使用
Infragistics NetAdvantage 2006 Volume 2 CLR 2.0曲折安装
两个Javascript小tip
PHP学习笔记之二
C#开发语音机项目
关于WebBrowser的DocumentText
原文地址:https://www.cnblogs.com/gwazy/p/154135.html
最新文章
研究一下.net分布式缓存系统Memcached
sqlserver调用msxml3.dll中的xmlhttp对象
[转载]sqlserver中用c#编写存储过程
CSS 清除所有的边距
使用.net编写存储过程
vs2010创建托管的clr项目
安装zend server ce版出错
ORA00257错误的解决办法
DELPHI获取网卡MAC地址
C#不安装Oracle10g客户端连接Oracle10g数据库【转】
热门文章
InforPower 富文本框中文选择异常解决
icelock判断注册是否有效的BUG
UltraWebGrid根据单元格内容禁用checkbox列
Fastreport 中文换行乱码解决
将所有符合条件的结果拼接成一列并用逗号隔开的一个sql语句
exp and imp
asp.net非常实用语句
购房风波
购房风波(3)法律上的支持
购房风波(2)
Copyright © 2011-2022 走看看