Exemplo n.º 1
0
 public void Load(Guid clientId, Guid practiceId, Guid bankAccountId)
 {
     PracticeId = practiceId;
     ClientId = clientId;
     ICashFlowManagerService service = new CashFlowManagerService();
     SelectedBankAccount  = service.GetBankAccount(bankAccountId);
 }
Exemplo n.º 2
0
 public ActionResult Create(ClientModel model)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     model.SelectedClient.PracticeId = model.PracticeId;
     service.AddClient(new List<ClientInfo>(){model.SelectedClient});
     return RedirectToAction("Index", "Client",new {practiceId= model.PracticeId.ToString()});
 }
Exemplo n.º 3
0
 public UserProfile GetUser(string userName)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     UserProfile user;
     user = service.GetUser(userName);
     return user;
 }
 public ActionResult Edit(BankAccountModel model)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     model.SelectedBankAccount.ClientId = model.ClientId;
     service.UpdateBankAccount(model.SelectedBankAccount);
     return RedirectToAction("Index", "BankAccount", new { clientId = model.ClientId.ToString(), practiceId = model.PracticeId.ToString() });
 }
 public ActionResult Edit(TransactionModel model)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     model.SelectedTransaction.ScheduleId = model.SelectedSchedule;
     model.SelectedTransaction.ClientId = model.ClientId;
     model.SelectedTransaction.TransactionTypeId = model.SelectedTransactionType;
     service.UpdateTransaction(model.SelectedTransaction);
     return RedirectToAction("Index", "Transaction", new { clientId = model.ClientId.ToString(),practiceId= model.PracticeId.ToString() });
 }
Exemplo n.º 6
0
        public void Load(string clientId, string practiceId, int numberMonths)
        {
            ICashFlowManagerService service = new CashFlowManagerService();
            Transactions = service.GetTransactions(new Guid(clientId));
            BankAccounts = service.GetBankAccounts(new Guid(clientId));
            PracticeId = practiceId;
            ClientId = clientId;

            TransactionHelper helper = new TransactionHelper();
            var results = helper.GenerateData(Transactions, numberMonths);
            SummaryChartData = helper.SummariseData(results, BankAccounts);
        }
Exemplo n.º 7
0
 public void LoadData(Guid clientId)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     SelectedTransaction = new TransactionInfo(){StartDate=DateTime.Now};
     Transactions = service.GetTransactions(clientId);
     IncomeTransactions = new List<TransactionInfo>();
     ExpenseTransactions = new List<TransactionInfo>();
     IncomeTransactions.AddRange((from t in Transactions where t.TransactionTypeId == new Guid(StringEnum.GetStringValue(Enumerations.TransactionType.Income)) select t).ToList());
     ExpenseTransactions.AddRange((from t in Transactions where t.TransactionTypeId == new Guid(StringEnum.GetStringValue(Enumerations.TransactionType.Expense)) select t).ToList());
     Schedules = service.GetScheduleTypes();
     TransactionTypes = service.GetTransactionTypes();
 }
 public ActionResult Create(PracticeModel model)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.AddPractice(model.SelectedPractice);
     return RedirectToAction("Index","Setup");
 }
 public ActionResult Delete(TransactionModel model, String transactionId, string clientId, string practiceId)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.DeleteTransaction(new Guid(transactionId));
     return RedirectToAction("Index", "Transaction", new { clientId = clientId, practiceId = practiceId });
 }
Exemplo n.º 10
0
 public void UpdateUser(int userId, Guid pracitceId, string email)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.AssociateAndUpdateUser(userId,pracitceId,email);
 }
Exemplo n.º 11
0
 public UserProfile GetUser(int userId)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     var user  = service.GetUser(userId);
     return user;
 }
Exemplo n.º 12
0
 public void LoadData()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     Practice = service.GetPractices();
 }
Exemplo n.º 13
0
 public void SaveTransactions(List<TransactionInfo> trans)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.AddTransactions(trans);
 }
Exemplo n.º 14
0
        public void LoadData(Guid clientId , Guid transactionId)
        {
            ICashFlowManagerService service = new CashFlowManagerService();
            var trans = service.GetTransactions(clientId,transactionId);
            Schedules = service.GetScheduleTypes();
            TransactionTypes = service.GetTransactionTypes();

            if (trans != null && trans.Count > 0)
            {
                SelectedTransaction = trans.First();
                SelectedSchedule = SelectedTransaction.ScheduleId;
                SelectedTransactionType = SelectedTransaction.TransactionTypeId;
            }
        }
Exemplo n.º 15
0
        public void LoadData(string practiceId)
        {
            ICashFlowManagerService service = new CashFlowManagerService();

            PracticeId = new Guid(practiceId);
            Clients = service.GetClients(PracticeId);

            Transactions = service.GetTransactions();
            BankAccounts = service.GetBankAccounts();
            PracticeId = new Guid(practiceId);
            PopulateClientPosition();
        }
Exemplo n.º 16
0
 public void Load()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     Schedules = service.GetScheduleTypes();
     TransactionTypes = service.GetTransactionTypes();
     TransactionsToAdd = new List<TransactionInfo>();
     Headers = new List<string>();
     Rows = new List<Row>();
 }
Exemplo n.º 17
0
 public List<TransactionTypeInfo> GetTransactionTypes()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     return service.GetTransactionTypes();
 }
Exemplo n.º 18
0
 public List<ScheduleInfo> GetSchedules()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     return service.GetScheduleTypes();
 }