Пример #1
0
        //////////////////////////POST//////////////////////////////
        public async Task <DataTable> Vote_Investor_data(FJC_Vote_Investor fjc_Vote_Investor, string Token)
        {
            DataSet ds = new DataSet();

            ds = await AppDBCalls.GetDataSet("Evote_Vote_Investor", CommonSpParam(fjc_Vote_Investor, Token), PassResolutionArray(fjc_Vote_Investor.resolutions));

            return(Reformatter.Validate_DataTable(ds.Tables[0]));
        }
Пример #2
0
        private Dictionary <string, object> CommonSpParam(FJC_Vote_Investor fjc_Vote_Investor, string Token)
        {
            Dictionary <string, object> dictLogin = new Dictionary <string, object>();

            dictLogin.Add("@event_id", fjc_Vote_Investor.event_id);
            dictLogin.Add("@submitted", fjc_Vote_Investor.submitted);
            dictLogin.Add("@token", Token);
            return(dictLogin);
        }
        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));
            }
        }