Пример #1
0
 public static U_UserInfo GetUserById(int userId)
 {
     UserService us = new UserService();
     us.Initialize();
     U_UserInfo u = us.UserInfoBll.Get(userId);
     return u;
 }
Пример #2
0
 public static MCatalog GetMyCatalog(int cataId)
 {
     UserService us = new UserService();
     us.Initialize();
     MCatalog mc = us.MCatalogBll.Get(cataId);
     return mc;
 }
Пример #3
0
 private void CheckMajiaUser()
 {
     toolStripStatusLabel1.Text = "正在检查马甲用户列表...";
     TMM.Service.UserService us = new UserService();
     us.Initialize();
     IList<U_UserInfo> mjList = us.UserInfoBll.GetListMj(null, 0, 1000);
     if (mjList == null || mjList.Count == 0)
     {
         toolStripStatusLabel1.Text = "马甲用户列表为空,请先设置!";
     }
     else
     {
         toolStripStatusLabel1.Text = "马甲用户检查成功!";
         Utils.ConfigHelper.UserIds = new int[mjList.Count];
         int i = 0;
         mjList.ToList().ForEach(ue => {
             Utils.ConfigHelper.UserIds[i] = ue.UserId;
             i++;
         });
         //绑定excel选择事件
         menuItemSelectExcel.Click += new EventHandler(menuItemSelectExcel_Click);
         openFileDialog1.FileOk += new CancelEventHandler(openFileDialog1_FileOk);
     }
 }
Пример #4
0
 public static string GetUserNickName(int userId)
 {
     string r = string.Empty;
     UserService us = new UserService();
     us.Initialize();
     U_UserInfo u = us.UserInfoBll.Get(userId);
     if (u != null) {
         if (!string.IsNullOrEmpty(u.NickName))
         {
             r = u.NickName;
         }
         else {
             r = u.Email;
         }
     }
     return r;
 }