Esempio n. 1
0
 /// <summary>
 /// This method is used for the Reactivate the inactive user
 /// </summary>
 /// <param name="i_sConnectionString">Connection string</param>
 /// <param name="i_tblUserInfo">User Info Datatable object</param>
 ///  /// <param name="i_nLoggedInUserID">Logged In User Id</param>
 /// <returns></returns>
 public Boolean ReactivateUser(string i_sConnectionString, int i_UserInfoId, int i_nLoggedInUserID)
 {
     try
     {
         //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
         using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
         {
             return(objUserInfoDAL.ReactivateUser(i_sConnectionString, i_UserInfoId, i_nLoggedInUserID));
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// This function will be called for updating the users last login time.
 /// The login time will be updated whenever user logins to the system.
 /// </summary>
 /// <param name="i_sConnectionString"></param>
 /// <param name="i_objUserInfoDTO"></param>
 /// <returns></returns>
 public void UpdateUserLastLoginTime(string i_sConnectionString, string i_sLoginId)
 {
     try
     {
         //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
         using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
         {
             objUserInfoDAL.UpdateUserLastLoginTime(i_sConnectionString, i_sLoginId);
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// This method is used for the insert/Update User Separation.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string</param>
        /// <param name="i_tblUserInfo">User Info Datatable object</param>
        ///  /// <param name="i_nLoggedInUserID">Logged In User Id</param>
        /// <returns></returns>
        public Boolean SaveUserEulaAcceptance(string i_sConnectionString, int i_nUserInfo, int i_nDocumentID, bool i_nEulaAcceptanceFlag)
        {
            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    objUserInfoDAL.SaveUserEulaAcceptance(i_sConnectionString, i_nUserInfo, i_nDocumentID, i_nEulaAcceptanceFlag);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(true);
        }
Esempio n. 4
0
        /// <summary>
        /// This method is used for the insert/Update User Separation.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string</param>
        /// <param name="i_tblUserInfo">User Info Datatable object</param>
        ///  /// <param name="i_nLoggedInUserID">Logged In User Id</param>
        /// <returns></returns>
        public Boolean SaveUserSeparation(string i_sConnectionString, DataTable i_tblUserInfo, int i_nLoggedInUserID)
        {
            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    objUserInfoDAL.SaveUserSeparation(i_sConnectionString, i_tblUserInfo, i_nLoggedInUserID);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(true);
        }
Esempio n. 5
0
        /// <summary>
        /// This method is used for the get user Details
        /// </summary>
        /// <param name="i_sConnectionString">DB Connection string</param>
        /// <param name="LoggedInId">LoggedInId</param>
        /// <returns>Object Authentication DTO</returns>

        public List <AuthenticationDTO> GetUserLoginDetails(string i_sConnectionString, string LoggedInId, string CalledFrom)
        {
            List <AuthenticationDTO> lstUserLoginDetails = new List <AuthenticationDTO>();

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    lstUserLoginDetails = objUserInfoDAL.GetUserLoginDetails(i_sConnectionString, LoggedInId, CalledFrom).ToList <AuthenticationDTO>();
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(lstUserLoginDetails);
        }
Esempio n. 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public InsiderTradingDAL.PasswordPolicyDTO GetPasswordPolicy(string i_sConnectionString)
        {
            PasswordPolicyDTO res = null;

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.GetPasswordPolicy(i_sConnectionString);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 7
0
        /// <summary>
        /// This method is used to save Contact Details List
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objPreclearanceRequestNonImplCompanyDTO"></param>
        /// <returns></returns>
        public ContactDetails InsertUpdatecontactDetails(string i_sConnectionString, DataTable dt_ContactDetails)
        {
            ContactDetails objContactDetailsDTO = null;

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    objContactDetailsDTO = objUserInfoDAL.InsertUpdatecontactDetails(i_sConnectionString, dt_ContactDetails);
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            return(objContactDetailsDTO);
        }
Esempio n. 8
0
        public List <ContactDetails> GetContactDetails(string i_sConnectionString, int i_nUserInfoId)
        {
            List <ContactDetails> lstGroupDocumentList = new List <ContactDetails>();

            //InsiderTradingDAL.CompanyDAL objCompanyDAL = new InsiderTradingDAL.CompanyDAL();
            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    lstGroupDocumentList = objUserInfoDAL.GetContactDetails(i_sConnectionString, i_nUserInfoId).ToList <ContactDetails>();
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(lstGroupDocumentList);
        }
Esempio n. 9
0
        /// <summary>
        /// This method is used for fetching the list of users for whom the PerformedPeriodEnd flag is set i.e.
        /// for Employees, Corporate and Non Employee types users.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string for which database</param>
        /// <returns>User Information List</returns>
        public List <UserInfoDTO> GetPeriodEndPerformedUserInfoList(string i_sConnectionString)
        {
            List <UserInfoDTO> userInfoList = new List <UserInfoDTO>();

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    userInfoList = objUserInfoDAL.GetPeriodEndPerformedUserInfoList(i_sConnectionString);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(userInfoList);
        }
Esempio n. 10
0
        public List <ContactDetails> GetRelativeDetails(string i_sConnectionString, int i_nUserInfoId)
        {
            List <ContactDetails> GetRelativeDetails = new List <ContactDetails>();

            //InsiderTradingDAL.CompanyDAL objCompanyDAL = new InsiderTradingDAL.CompanyDAL();
            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    GetRelativeDetails = objUserInfoDAL.GetRelativeDetails(i_sConnectionString, i_nUserInfoId).ToList <ContactDetails>();
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(GetRelativeDetails);
        }
Esempio n. 11
0
        public UserInfoDTO BlockUnblockUser(string i_sConnectionString, int UserInfoID, bool IsBlocked, string Blocked_UnBlock_Reason, int CreatedBy)
        {
            UserInfoDTO objUserInfoDTO = null;

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    objUserInfoDTO = objUserInfoDAL.BlockUnblockUser(i_sConnectionString, UserInfoID, IsBlocked, Blocked_UnBlock_Reason, CreatedBy);
                }
            }
            catch (Exception ex)
            {
                throw;
            }

            return(objUserInfoDTO);
        }
Esempio n. 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public PasswordManagementDTO GetUserFromHashCode(string i_sConnectionString, string i_sHashCode)
        {
            PasswordManagementDTO res = null;

            try
            {
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.GetUserFromHashCode(i_sConnectionString, i_sHashCode);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 13
0
        /// <summary>
        /// This method is used for the insert/Update User details.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string</param>
        /// <param name="i_objUserInfoDTO">User Info Object</param>
        /// <returns></returns>
        public UserInfoDTO InsertUpdateUserDetails(string i_sConnectionString, UserInfoDTO i_objUserInfoDTO)
        {
            UserInfoDTO objUserInfoDTO = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    objUserInfoDTO = objUserInfoDAL.InsertUpdateUserDetails(i_sConnectionString, i_objUserInfoDTO);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(objUserInfoDTO);
        }
Esempio n. 14
0
        /// <summary>
        /// This function will be used for validating if the given user is registered under the given company database.
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserDetailsDTO"></param>
        public bool ValidateUser(string i_sConnectionString, AuthenticationDTO i_objAuthenticationDTO, ref UserInfoDTO o_objUserInfoDTO)
        {
            bool bReturn = false;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    bReturn = objUserInfoDAL.ValidateUser(i_sConnectionString, i_objAuthenticationDTO, ref o_objUserInfoDTO);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(bReturn);
        }
Esempio n. 15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_sLoginId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public InsiderTradingDAL.TokenDetailsDTO SaveFormTokenStatus(string i_sConnectionString, int inp_UserId, int inp_FormId, string inp_CookieName)
        {
            InsiderTradingDAL.TokenDetailsDTO res = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.SaveFormTokenStatus(i_sConnectionString, inp_UserId, inp_FormId, inp_CookieName);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_sLoginId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public InsiderTradingDAL.SessionDetailsDTO GetCookieStatus(string i_sConnectionString, int inp_UserId, string inp_CookieName, bool inp_isNew, bool inp_isUpdateCookie)
        {
            InsiderTradingDAL.SessionDetailsDTO res = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.GetCookieStatus(i_sConnectionString, inp_UserId, inp_CookieName, inp_isNew, inp_isUpdateCookie);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 17
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public bool DeleteUserDetails(string i_sConnectionString, int i_nUserInfoId, int i_nLoggedInUserID)
        {
            bool bReturn = false;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    bReturn = objUserInfoDAL.DeleteUserDetails(i_sConnectionString, i_nUserInfoId, i_nLoggedInUserID);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(bReturn);
        }
Esempio n. 18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_sLoginId"></param>
        /// <param name="o_nReturnValue"></param>
        /// <param name="o_nErroCode"></param>
        /// <param name="o_sErrorMessage"></param>
        /// <returns></returns>
        public InsiderTradingDAL.UserInfoDTO GetUserAuthencticationDetails(string i_sConnectionString, string i_sLoginId)
        {
            InsiderTradingDAL.UserInfoDTO res = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.GetUserAuthencticationDetails(i_sConnectionString, i_sLoginId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 19
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public bool ChangePassword(string i_sConnectionString, ref PasswordManagementDTO i_objPwdMgmtDTO)
        {
            bool bReturn = false;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    bReturn = objUserInfoDAL.ChangePassword(i_sConnectionString, ref i_objPwdMgmtDTO);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(bReturn);
        }
Esempio n. 20
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i_sConnectionString"></param>
        /// <param name="i_objUserInfoDTO"></param>
        /// <returns></returns>
        public PasswordManagementDTO ForgetPassword(string i_sConnectionString, PasswordManagementDTO i_objPwdMgmtDTO)
        {
            PasswordManagementDTO res = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.ForgetPassword(i_sConnectionString, i_objPwdMgmtDTO);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 21
0
        public bool CheckConcurrentSessionConfiguration(string i_sConnectionString)
        {
            bool bReturn = false;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    bReturn = objUserInfoDAL.CheckConcurrentSessionConfiguration(i_sConnectionString);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(bReturn);
        }
Esempio n. 22
0
        public InsiderTradingDAL.UserEducationDTO GetUserDetails(string i_sConnectionString, int i_nUserInfoId, int UEW_id)
        {
            InsiderTradingDAL.UserEducationDTO res = null;

            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    res = objUserInfoDAL.GetUserEducationDetails(i_sConnectionString, i_nUserInfoId, UEW_id);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(res);
        }
Esempio n. 23
0
        /// <summary>
        /// This method is used for the insert/Update DMAT details.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string</param>
        /// <param name="i_nDMATAccountHoderID">DMATAccountHoderID to delete</param>
        /// <param name="nLoggedInUserId">Logged In User</param>
        /// <returns>Returns boolean value based on the result</returns>
        public bool DeleteFormToken(string i_sConnectionString, int i_nLoggedInUserID, int i_FormID)
        {
            bool bReturn = false;

            try
            {
                //DMATDetailsDAL objDMATDetailsDAL = new DMATDetailsDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    bReturn = objUserInfoDAL.DeleteFormToken(i_sConnectionString, i_nLoggedInUserID, i_FormID);
                }
            }
            catch (Exception exp)
            {
                bReturn = false;
                throw exp;
            }

            return(bReturn);
        }
Esempio n. 24
0
        /// <summary>
        /// This method is used for get user info list by User Type.
        /// </summary>
        /// <param name="i_sConnectionString">Connection string for which database</param>
        /// <param name="i_objUserInfoDTO">User Type Object</param>
        /// <returns>User Information List</returns>
        public IEnumerable <UserInfoDTO> GetUserInfoList(string i_sConnectionString, UserInfoDTO i_objUserInfoDTO, out int o_nReturnValue, out int o_nErroCode,
                                                         out string o_sErrorMessage)
        {
            IEnumerable <UserInfoDTO> userInfoList = null;

            o_nReturnValue  = 0;
            o_nErroCode     = 0;
            o_sErrorMessage = "";
            try
            {
                //InsiderTradingDAL.UserInfoDAL objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL();
                using (var objUserInfoDAL = new InsiderTradingDAL.UserInfoDAL())
                {
                    userInfoList = objUserInfoDAL.GetUserInfoList(i_sConnectionString, i_objUserInfoDTO);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }

            return(userInfoList);
        }