Esempio n. 1
0
        public DataTable GetMyMFFundInvestments(GetMFFundInvestmentsRequest request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "portfolioId", Value = request.PortfolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "fundid", Value = request.FundId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "folioId", Value = request.FolioId
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetMyMFFundInvestments", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 2
0
        public DataTable GetInvestmentsByMonth(DashboardRequest request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "FromDate", Value = request.FromDate
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "ToDate", Value = request.ToDate
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "portfolioId", Value = request.PortfolioId
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "Get_Investments_Details", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
        public DataTable GetExpenses(GetExpenses request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "fromDate", Value = request.FromDate
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "toDate", Value = request.ToDate
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "accountId", Value = request.AccountId
            });

            DataSet ds = SQLHelper.ExecuteProcedure("HomeTransactions", "GetHomeTransactions", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 4
0
        public DataTable GetFundValue(GetFundValueRequst getFundValueRequest)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "portfolio", Value = getFundValueRequest.PortfolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "schemaCode", Value = getFundValueRequest.SchemaCode
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "folioId", Value = getFundValueRequest.FolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "optionId", Value = getFundValueRequest.OptionId
            });


            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetFundValue", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
        public DataTable GetStores()
        {
            List <SqlParameter> parameters = new List <SqlParameter>();
            DataSet             ds         = SQLHelper.ExecuteProcedure("HomeTransactions", "GetStore", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 6
0
        public DataTable GetFunds()
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetMFFunds", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 7
0
        public DataTable GetFundHouses()
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "Get_MF_FundHouses", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                string jsonString = Utilities.Conversions.DataTableToJSON(ds.Tables[0]);
                Utilities.WriteToFile.Write(@"C:\Temp\FundHouses.json", jsonString);
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 8
0
        public DataTable GetFundTransactions(MutualFundRequest getFundTransactions)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "@PortfolioId", Value = getFundTransactions.PortfolioId
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetIndividualTransactions", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
        public DataTable GetStores(string store)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "store", Value = store
            });

            DataSet ds = SQLHelper.ExecuteProcedure("HomeTransactions", "GetStore", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
        public DataTable AddExpenseTransaction(ExpenseTransaction transaction)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "transactionDate", Value = transaction.Date
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "groupId", Value = transaction.GroupId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "subgroupid", Value = transaction.SubGroupId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "item", Value = transaction.Item
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Decimal, ParameterName = "amount", Value = transaction.Amount
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "accountid", Value = transaction.AccountId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "transactedBy", Value = transaction.TransactedBy
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "store", Value = transaction.Store
            });

            DataSet ds = SQLHelper.ExecuteProcedure("HomeTransactions", "AddHomeTransactions", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 11
0
        public DataTable GetToStocks(DateTime fromdate, DateTime todate, int Detail)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            //parameters.Add(new SqlParameter() { DbType = DbType.String, ParameterName = "fromdate", Value = fromdate });
            //parameters.Add(new SqlParameter() { DbType = DbType.String, ParameterName = "todate", Value = todate });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "details", Value = Detail
            });

            DataSet ds = SQLHelper.ExecuteProcedure("Investments", "GetStocks", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 12
0
        public DataTable GetMFDdailyTracker(GetMFDailyTracker request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "fromDate", Value = request.fromDate
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "toDate", Value = request.toDate
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetMFDdailyTracker", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 13
0
        public DataTable GetInvestments(DashboardIndividual request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "PortfolioId", Value = request.PortfolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "Type", Value = request.Type
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetIndividualTransactions", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 14
0
        public DataTable GetFundNav(GetFundNavRequest getFundNavRequest)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "schemaCode", Value = getFundNavRequest.SchemaCode
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "date", Value = getFundNavRequest.Date.Date
            });


            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "GetFundPrice", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 15
0
        public DataTable AddTransaction(AddMFTransactionRequest request)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "PortfolioId", Value = request.PortfolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "houseId", Value = request.FundHouseId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "typeId", Value = request.FundTypeId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "categoryId", Value = request.FundCategoryId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "optionsId", Value = request.FundOptionsId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "schemaCode", Value = request.SchemaCode
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "growthschemaCode", Value = request.GrowthSchemaCode
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "fundName", Value = request.FundName
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Date, ParameterName = "PurchaseDate", Value = request.PurchaseDate.Date
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Int32, ParameterName = "FolioId", Value = request.FolioId
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Decimal, ParameterName = "Amount", Value = request.Amount
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Decimal, ParameterName = "PurchaseNAV", Value = request.PurchaseNAV
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.Decimal, ParameterName = "Units", Value = request.Units
            });
            parameters.Add(new SqlParameter()
            {
                DbType = DbType.String, ParameterName = "SIP", Value = (request.IsSIP == true ? "Y" : "N")
            });

            DataSet ds = SQLHelper.ExecuteProcedure("PersonalFinance", "AddMFPurchase", CommandType.StoredProcedure, parameters);

            if (ds != null)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }