一个具体的Facade业务类,大家可以看看是如何使用FacadeBase类和如何控制事务的。所有的业务Facade类也可以自动生成。...

ExpandedBlockStart.gif ContractedBlock.gif /**/ ////
InBlock.gif
///
InBlock.gif
///    Copyright (C), 2002-2008, Murphy Corporation.
InBlock.gif
///    
InBlock.gif
///    FileName:        FDSystem.cs
InBlock.gif
///    Author:            胡晓伟
InBlock.gif
///                    
ExpandedBlockEnd.gif
////

None.gif using  System;
None.gif
using  System.Data;
None.gif
using  System.Collections;
None.gif
None.gif
using  SEM.DataEntity;
None.gif
using  SEM.DataAccess.SysManage.RightManage;
None.gif
using  COM.Makinfo.Facade;
None.gif
namespace  SEM.Facade.SysManage.RightManage
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//// <summary>
InBlock.gif    
/// FDSysUser 的摘要说明。
ExpandedSubBlockEnd.gif    
/// </summary>

InBlock.gif    public class FDSysUser: FacadeBase
ExpandedSubBlockStart.gifContractedSubBlock.gif    
dot.gif{
InBlock.gif        
public DASysUser daSysUser;
InBlock.gif        
public DASysUserDept daSysUserDept;
InBlock.gif
InBlock.gif        
public FDSysUser()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this.daSysUser = new DASysUser();
ExpandedSubBlockEnd.gif        }

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
read#region read
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 条件查询
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="strdeptcode"></param>
InBlock.gif        
/// <param name="intstoped"></param>
InBlock.gif        
/// <param name="strusername"></param>
InBlock.gif        
/// <param name="strusercode"></param>
InBlock.gif        
/// <param name="strareacode"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadAllData( string strIsUsed,string strUserName,string strUserCode,string strAreaCode)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadAllData (strIsUsed,strUserName,strUserCode,strAreaCode);
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="aryIDs"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByIDs(string[] aryIDs)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataByIDs(aryIDs);
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 通过GUID(数组)查询记录
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="aryGUIDs"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByGUIDs(string[] aryGUIDs)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataByGUIDs(aryGUIDs) ;
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 根据GUID查询人员信息(Daizh)
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="aryIDs"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByGuid(string strGuid)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataByGuid(strGuid);
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 根据Code查询人员信息(Daizh)
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="aryIDs"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadUserNameByCode(string strCode)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadUserNameByCode(strCode);
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="aryIDs"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByIDs(string aryIDs)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            
return this.ReadDataByIDs( new string[]dot.gif{aryIDs});
ExpandedSubBlockEnd.gif        }

InBlock.gif     
InBlock.gif        
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="depcode"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable GetAllUserByDepCode(string depcode)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.GetAllUserByDepCode (depcode);        
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 读取人口职位关联表中的数据。
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="strAreaCode"></param>
InBlock.gif        
/// <param name="strDepGuid"></param>
InBlock.gif        
/// <param name="strPostGuid"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByUserPost(string strAreaCode,string strDepGuid,string  strPostGuid)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataByUserPost (strAreaCode,strDepGuid, strPostGuid);
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 读取人口角色关联表中的数据。
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="strAreaCode"></param>
InBlock.gif        
/// <param name="strRoleGuid"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadDataByUserRole(string strAreaCode,string strRoleGuid)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataByUserRole (strAreaCode,strRoleGuid);
InBlock.gif
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="usercode"></param>
ExpandedSubBlockEnd.gif        
/// <returns></returns>

InBlock.gif        public DataTable ReadUserInfoByLogIn(string usercode)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif            DataTable dataSysUser 
= this.daSysUser.ReadDataByIDs(new string[]dot.gif{usercode});
InBlock.gif            
InBlock.gif            
return dataSysUser;
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 得取地区数组\部门数组的所有用户
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="strArea">地区数组</param>
InBlock.gif        
/// <param name="strDept">部门数组</param>
ExpandedSubBlockEnd.gif        
/// <returns>用户表</returns>

ExpandedSubBlockStart.gifContractedSubBlock.gif        public DataTable ReadDataArrayUserCode(string[] strArea,string[] strDept) dot.gif{
InBlock.gif            
return this.daSysUser.ReadDataArrayUserCode (strArea,strDept);        
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockEnd.gif        
#endregion

InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
create#region create
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// Create  new income type info.
InBlock.gif        
/// </summary>
ExpandedSubBlockEnd.gif        
/// <param name="defineData"></param>

InBlock.gif        public void Create(DataTable dataBankBook)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this.daSysUser.Create(dataBankBook);
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif        
#endregion
 create
InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
update#region update
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 修改密码
InBlock.gif        
/// </summary>
ExpandedSubBlockEnd.gif        
/// <param name="dataSysUser"></param>

InBlock.gif        public void UpdatePass(string strUserID,string strNewPass)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            DataTable dtData                
= OsdSysUser.NewDataTable();
InBlock.gif            DataRow row                        
= dtData.NewRow();
InBlock.gif            row[OsdSysUser.Col_UserCode]    
= strUserID;
InBlock.gif            row[OsdSysUser.Col_UserPass]    
= strNewPass;
InBlock.gif            dtData.Rows.Add(row);
InBlock.gif            dtData.AcceptChanges();
InBlock.gif
InBlock.gif            
//修改密码
InBlock.gif
            this.daSysUser.UpdatePass(dtData);
ExpandedSubBlockEnd.gif        }
    
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
ExpandedSubBlockEnd.gif        
/// <param name="dataBankBook"></param>

InBlock.gif        public void Update(DataTable dtData)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this.daSysUser.Update(dtData);
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif        
#endregion
 update
InBlock.gif
ContractedSubBlock.gifExpandedSubBlockStart.gif        
delete#region delete
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 
InBlock.gif        
/// </summary>
ExpandedSubBlockEnd.gif        
/// <param name="aryIDs"></param>

InBlock.gif        public void DeleteDataByIDs(string[] aryIDs)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            
this.daSysUser.DeleteDataByIDs(aryIDs);
ExpandedSubBlockEnd.gif        }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        
/**//// <summary>
InBlock.gif        
/// 修改用户的所属部门----添加一个部门
InBlock.gif        
/// </summary>
InBlock.gif        
/// <param name="usercode"></param>
ExpandedSubBlockEnd.gif        
/// <param name="depcode"></param>

InBlock.gif        public void AddUserToDeptByUserCode(DataTable dataBankBook)
ExpandedSubBlockStart.gifContractedSubBlock.gif        
dot.gif{
InBlock.gif            daSysUserDept.Create (dataBankBook);
ExpandedSubBlockEnd.gif        }

InBlock.gif
InBlock.gif
ExpandedSubBlockEnd.gif        
#endregion

ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

None.gif

转载于:https://www.cnblogs.com/richardhu/archive/2006/07/25/459637.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值