Ejemplo n.º 1
0
        private void CatagoryAssigningForm_Load(object sender, EventArgs e)
        {
            ExpenseImportFormModel.GetExpenseData(ref dtsExpenses);

            CatagoryAssignController.GetData(ref dtsCatagory);

            CatagoryAssignController.PopulateContentMenuStrip(cmsBudgetItems);


            CatagoryAssignController.PropogateExpenseCatagory(dtsExpenses, dtsCatagory);
        }
Ejemplo n.º 2
0
        private void cmsBudgetItems_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (cmsBudgetItems.SourceControl.Equals(dgvExpenseItems))
            {
                string description = (((DataRowView)dgvExpenseItems.SelectedRows[0].DataBoundItem).Row[dtsExpenses.tttExpenses.Description_1Column].ToString());
                string item        = e.ClickedItem.Text;

                string subCatagory = "";
                string ExpenseID   = (string)(((DataRowView)dgvExpenseItems.SelectedRows[0].DataBoundItem).Row[dtsExpenses.tttExpenses.UniqueExpenseIDColumn.Ordinal]);

                CatagoryAssignController.AssignCatagory(description, item, ref dtsCatagory, ref dtsExpenses, subCatagory, ExpenseID);

                CatagoryAssignController.PropogateExpenseCatagory(dtsExpenses, dtsCatagory);
            }
            else
            {
                ((DataRowView)dgvCatagory.SelectedRows[0].DataBoundItem).Row[dtsCatagory.tttCatagory.BudgetItemNameColumn.Ordinal] = e.ClickedItem.Text;
            }
        }