コード例 #1
0
ファイル: SendInviteExt.cs プロジェクト: bookxiao/orisoft
 public static Maticsoft.Accounts.Bus.User GetUNameByMid(int mid)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("SELECT  TrueName ");
     strSql.Append("FROM    dbo.Tao_SendInvite tsi ");
     strSql.Append("LEFT JOIN dbo.Accounts_Users au ON InviteeID=au.UserID ");
     strSql.Append("WHERE   ModuleID = @ModuleID ");
     SqlParameter[] parameters = {
                                 new SqlParameter("@ModuleID",SqlDbType.Int)
                                 };
     parameters[0].Value = mid;
     Maticsoft.Accounts.Bus.User user = new Accounts.Bus.User();
     DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
     if (ds.Tables[0].Rows.Count > 0)
     {
         if (ds.Tables[0].Rows[0]["TrueName"] != null && ds.Tables[0].Rows[0]["TrueName"].ToString() != "")
         {
             user.TrueName = ds.Tables[0].Rows[0]["TrueName"].ToString();
         }
         return user;
     }
     else
     {
         return null;
     }
 }
コード例 #2
0
ファイル: UsersExp.cs プロジェクト: bookxiao/orisoft
 /// <summary>
 /// 得到用户全部属性信息实体
 /// </summary>
 public Maticsoft.Model.SysManage.UsersExpModel GetUsersModel(int UserID)
 {
     //Users
     Maticsoft.Model.SysManage.UsersExpModel model = dal.GetModel(UserID);
     if (model == null)
     {
         model = new UsersExpModel();
     }
     Maticsoft.Accounts.Bus.User user = new Accounts.Bus.User(UserID);
     model.Activity = user.Activity;
     model.DepartmentID = user.DepartmentID;
     model.Email = user.Email;
     model.EmployeeID = user.EmployeeID;
     model.Phone = user.Phone;
     model.Sex = user.Sex;
     model.Style = user.Style;
     model.TrueName = user.TrueName;
     model.User_cLang = user.User_cLang;
     model.User_dateApprove = user.User_dateApprove;
     model.User_dateCreate = user.User_dateCreate;
     model.User_dateExpire = user.User_dateExpire;
     model.User_dateValid = user.User_dateValid;
     model.User_iApprover = user.User_iApprover;
     model.User_iApproveState = user.User_iApproveState;
     model.User_iCreator = user.User_iCreator;
     model.UserID = user.UserID;
     model.UserName = user.UserName;
     model.UserType = user.UserType;
     return model;
 }