public async Task <IActionResult> Download_Document([FromQuery] string DownloadType)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                switch (DownloadType.ToLower())
                {
                case "agreement":
                    var result = await _documentDownloadService.AgreementGenerator(Token);

                    Response.Headers.Add("Access-Control-Expose-Headers", "Content-Disposition");
                    Response.Headers.Add("Content-Disposition", "attachment");
                    Response.Headers.Add("filename", result.Rows[0]["file_name"].ToString());


                    return(Ok(Reformatter.Response_Object("Agreement must be executed on Stamp Paper of Rs. 600", ref result)));

                    break;

                default:
                    throw new CustomException.InvalidAttempt();
                }
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #2
0
        public async Task <IActionResult> RegistrationSave(FJC_Registration fJC_Registration)
        {
            try
            {
                await ManageRecaptcha.ValidateUser(fJC_Registration.captcha);

                if (fJC_Registration.reg_type_id == 1 || fJC_Registration.reg_type_id == 2)
                {
                    fJC_Registration.panid = "XXXXX0000X";
                }

                if (fJC_Registration.reg_type_id != 3)
                {
                    if (!Regex.IsMatch(fJC_Registration.reg_no, @"^[a-zA-Z0-9 -,_]*$"))
                    {
                        throw new CustomException.InvalidRegNo();
                    }
                }
                var result = await _registrationService.Registration_InsertData(fJC_Registration);

                return(Ok(Reformatter.Response_Object("UserID: " + result.Rows[0][0] + " generated. New Registration completed Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #3
0
        public async Task <IActionResult> UploadAgreement(FJC_DOC_Upload fJC_DOC_Upload)
        {
            var identity = (ClaimsIdentity)User.Identity;
            var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
            var result   = (System.Data.DataTable)null;

            switch (fJC_DOC_Upload.upload_type.ToLower())
            {
            case "agreement":
                result = await _documentUploadService.AgreementUpload_Details(fJC_DOC_Upload.doc_id, Token);

                return(Ok(Reformatter.Response_Object("File uploaded successfully and will be validated soon", ref result)));

                break;

            case "power_of_attorney":
                result = await _documentUploadService.PowerOfAttorneyDownload(fJC_DOC_Upload.doc_id, Token);

                return(Ok(Reformatter.Response_Object("File uploaded successfully", ref result)));

                break;

            default:
                throw new CustomException.InvalidActivity();
            }
        }
        public async Task <IActionResult> ForgotPassword(FJC_ForgotPassword fJC_forgot)
        {
            //TypeOfUser attribute
            //Scrutinizer - S, Investor - I, Company - C, Custodian - T, Corporate Shareholder - H, RTA - R
            try
            {
                await ManageRecaptcha.ValidateUser(fJC_forgot.captcha);

                var result = (DataTable)null;
                if ((fJC_forgot.TypeOfUser == 'I' && fJC_forgot.TypeOfUpdate != 'E'))
                {
                    if (!Regex.IsMatch(fJC_forgot.PAN_ID, @"^[a-zA-Z0-9]*$"))
                    {
                        throw new CustomException.InvalidPanPattern();
                    }
                }
                else //if(fJC_forgot.TypeOfUser == 'C' || fJC_forgot.TypeOfUser == 'R' || fJC_forgot.TypeOfUser == 'S' || fJC_forgot.TypeOfUser == 'T' || fJC_forgot.TypeOfUser == 'H')
                {
                    fJC_forgot.PAN_ID = "XXXXX0000X";
                }


                if (fJC_forgot.TypeOfUser == 'I')
                {
                    switch (fJC_forgot.TypeOfUpdate)
                    {
                    case 'D':         //Date of birth cases
                        result = await _loginService.ForgotPassword_DOB_Data(fJC_forgot);

                        break;

                    case 'B':         //Bank Account cases
                        result = await _loginService.ForgotPassword_BANK_ACC_Data(fJC_forgot);

                        break;

                    case 'E':         //Email Cases
                        result = await _loginService.ForgotPasswordData(fJC_forgot);

                        break;
                    }
                }
                else
                {
                    result = await _loginService.ForgotPasswordData(fJC_forgot);
                }
                return(Ok(Reformatter.Response_Object("Password reset successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> GetInvestorEmailID([FromQuery] string UserID)

        {
            try
            {
                var result = await _loginService.GetInvestorEmailIDData(UserID);

                return(Ok(Reformatter.Response_Object("Email ID retrieved successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #6
0
        public async Task <IActionResult> RequestBillSave(FJC_RequestBill fjc_RequestBill)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _requestBillService.RequestBill_data(fjc_RequestBill, Token);

                return(Ok(Reformatter.Response_Object("Date Updated Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #7
0
        public async Task <IActionResult> VideoConfDetails([FromQuery] int event_id)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _videoConfService.Get_VideoConf(event_id, Token);

                return(Ok(Reformatter.Response_Object("VC Details updated in event successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> ShareHolder_DeRestrict(FJC_SharedHolder_Derestrict fjc_SharedHolder_Derestrict)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _ShareHolder_RestrictService.ShareHolder_DerestrictData(fjc_SharedHolder_Derestrict, Token);

                return(Ok(Reformatter.Response_Object("ShareHolder Derestricted Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> PostReports([FromQuery] int event_id)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _ReportsService.ReportsData(event_id, Token);

                return(Ok(Reformatter.Response_Object("Reports will be generated now", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #10
0
        public async Task <IActionResult> GetAudienceSearch([FromQuery] int aud_id)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _accountSearchService.GetAudience_Details(aud_id, Token);

                return(Ok(Reformatter.Response_Object("Records retrieved successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #11
0
        public async Task <IActionResult> VerifyAccount(FJC_VerifyAccount verifyAccount)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _accountSearchService.Verify_AccountData(verifyAccount, Token);

                return(Ok(Reformatter.Response_Object("Account Verified Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #12
0
        public async Task <IActionResult> GetRegistrationID()
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _registrationService.GetRegistrationIDData(Token);

                return(Ok(Reformatter.Response_Object("Profile Details retrieved Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #13
0
        public async Task <IActionResult> FeedbackSave(FJC_Feedback fjc_feedback)
        {
            try
            {
                await ManageRecaptcha.ValidateUser(fjc_feedback.captcha);

                var result = await _feedbackService.Feedback_Details(fjc_feedback);

                return(Ok(Reformatter.Response_Object("Feedback Submitted successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #14
0
        public async Task <IActionResult> Finalize_Event([FromQuery] int event_id)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _FinalizeEventService.FinalizeEVENT(event_id, Token);

                return(Ok(Reformatter.Response_Object("Event Finalize Successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #15
0
        public async Task <IActionResult> SubmitROM(FJC_Event_Update _event)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _CustodianROMUploadService.Submit_Vote(_event, Token);

                return(Ok(Reformatter.Response_Object("File updated successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> ChangePassword(FJC_ChangePassword fJC_changePwd)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _loginService.ChangePasswordData(fJC_changePwd, Token);

                return(Ok(Reformatter.Response_Object("Password Changed successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #17
0
        public async Task <IActionResult> ROM(FJC_ROMUpload std)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _CustodianROMUploadService.Cutodian_ROMUpload_Details(std, Token);

                return(Ok(Reformatter.Response_Object("File Uploaded successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #18
0
        public async Task <IActionResult> GenerateEVENTUser(FJC_GenerateEVENT fJC_EVSN)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _GenerateEVENTService.GenerateEVENT(fJC_EVSN, Token);

                return(Ok(Reformatter.Response_Object("Event ID : " + result.Rows[0][0] + " has been generated succesfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> PaneList(FJC_PaneList fJC_PaneList)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);

                var result = await _PaneListService.PaneListData(fJC_PaneList, Token);

                return(Ok(Reformatter.Response_Object("Panelist added successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
Exemple #20
0
        public async Task <IActionResult> SpeakerListDelete(FJC_SpeakerList fJC_Speaker)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);

                var result = await _speakerListService.SpeakerListDeleteData(fJC_Speaker, Token);

                return(Ok(Reformatter.Response_Object("Speaker details Deleted successfully", ref result)));
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }
        public async Task <IActionResult> Vote_InvestorSave(FJC_Vote_Investor fjc_Vote_Investor)
        {
            try
            {
                var identity = (ClaimsIdentity)User.Identity;
                var Token    = Token_Handling.Get_Token_FromHeader(Request.Headers, identity);
                var result   = await _vote_InvestorService.Vote_Investor_data(fjc_Vote_Investor, Token);

                if (fjc_Vote_Investor.submitted == 0)
                {
                    return(Ok(Reformatter.Response_Object("Investor Vote saved Successfully", ref result)));
                }
                else
                {
                    return(Ok(Reformatter.Response_Object("Investor Vote submitted Successfully", ref result)));
                }
            }
            catch (Exception ex)
            {
                return((new HandleCatches()).ManageExceptions(ex));
            }
        }