public void Load(Guid clientId, Guid practiceId, Guid bankAccountId)
 {
     PracticeId = practiceId;
     ClientId = clientId;
     ICashFlowManagerService service = new CashFlowManagerService();
     SelectedBankAccount  = service.GetBankAccount(bankAccountId);
 }
 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()});
 }
Esempio 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() });
 }
        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);
        }
 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 });
 }
Esempio n. 10
0
 public void UpdateUser(int userId, Guid pracitceId, string email)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.AssociateAndUpdateUser(userId,pracitceId,email);
 }
Esempio n. 11
0
 public UserProfile GetUser(int userId)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     var user  = service.GetUser(userId);
     return user;
 }
Esempio n. 12
0
 public void LoadData()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     Practice = service.GetPractices();
 }
 public void SaveTransactions(List<TransactionInfo> trans)
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     service.AddTransactions(trans);
 }
        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;
            }
        }
Esempio 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();
        }
 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>();
 }
 public List<TransactionTypeInfo> GetTransactionTypes()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     return service.GetTransactionTypes();
 }
 public List<ScheduleInfo> GetSchedules()
 {
     ICashFlowManagerService service = new CashFlowManagerService();
     return service.GetScheduleTypes();
 }