コード例 #1
0
        public string UpdateViewCount(int FAQID,int usermoduleID,int portalID)
        {
            string question = string.Empty;
            int count = 0;
            try
            {
                FAQsDataContext dbFAQ = new FAQsDataContext(SystemSetting.SageFrameConnectionString);
                var FAQs = dbFAQ.sp_FAQsViewCountUpdate(FAQID, true, portalID);
                foreach (sp_FAQsViewCountUpdateResult faq in FAQs)
                {
                    count = faq.ViewCount;
                }
                BaseUserControl suc = new BaseUserControl();
                var faqAll = dbFAQ.sp_GetFAQWithTemplate(usermoduleID, true, true, portalID, suc.GetUsername);
                foreach (sp_GetFAQWithTemplateResult faqs in faqAll)
                {
                    if (FAQID == (int)faqs.FAQID)
                    {
                        question = faqs.QUESTION;
                    }
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }
            return question;
        }
コード例 #2
0
 public string[] GetUsernameList(string prefixText, int count)
 {
     List<string> items = new List<string>();
     try
     {
         BaseUserControl suc = new BaseUserControl();
         List<UserManagementInfo> objList = UserManagementController.GetUsernameByPortalIDAuto(prefixText, 12, count, suc.GetUsername);
         foreach (UserManagementInfo objInfo in objList)
         {
             items.Add(objInfo.UserName);
         }
         return items.ToArray();
     }
     catch
     {
         return items.ToArray();
     }
 }
コード例 #3
0
 public string[] GetUsernameList(string prefixText, int count)
 {
     List<string> items = new List<string>();
     try
     {
         BaseUserControl suc = new BaseUserControl();
         UserManagementDataContext dbuser = new UserManagementDataContext(SystemSetting.SageFrameConnectionString);
         var users = dbuser.sp_GetUsernameByPortalIDAuto(prefixText, 12, count, suc.GetUsername);
         foreach (var user in users)
         {
             items.Add(user.UserName);
         }
         return items.ToArray();
     }
     catch
     {
         return items.ToArray();
     }
 }