Example #1
0
        private void DownloadDCRSUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type = typeof(LoanApplicationDetail);
                FieldInfo[] myFieldInfo;
                myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                              | BindingFlags.Public);
                loSearches        = new SearchesUI(myFieldInfo, _Type, "tsmDownloadDCRS");
                loSearches.lQuery = "";
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "DownloadDCRSUI_Load");
                em.ShowDialog();
                return;
            }

            cboBranch.DataSource    = loBranch.getAllData("ViewAll", "", "");
            cboBranch.DisplayMember = "Description";
            cboBranch.ValueMember   = "Id";
            cboBranch.SelectedIndex = -1;

            cboCollector.DataSource    = loCollector.getAllData("ViewAll", "", "");
            cboCollector.DisplayMember = "Employee Name";
            cboCollector.ValueMember   = "Id";
            cboCollector.SelectedIndex = -1;

            cboBranch.SelectedValue = GlobalVariables.CurrentBranchId;
        }
        private void ListFormSalesUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "SalesDiscount":
                    _Type       = typeof(SalesDiscount);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "SalesPerson":
                    _Type       = typeof(SalesPerson);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormSalesUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }
        private void EndOfDayUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type = typeof(PurchaseRequest);
                FieldInfo[] myFieldInfo;
                myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                              | BindingFlags.Public);
                loSearches        = new SearchesUI(myFieldInfo, _Type, "tsmEndOfDay");
                loSearches.lQuery = "";
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "EndOfDayUI_Load");
                em.ShowDialog();
                return;
            }

            cboBranch.DataSource    = loBranch.getAllData("ViewAll", "", "");
            cboBranch.DisplayMember = "Description";
            cboBranch.ValueMember   = "Id";
            cboBranch.SelectedIndex = -1;

            cboBranch.SelectedValue = GlobalVariables.CurrentBranchId;
            viewDetails();
        }
        private void ListFormAccountingUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "Bank":
                    _Type       = typeof(Bank);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "ChartOfAccount":
                    _Type       = typeof(ChartOfAccount);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "MainAccount":
                    _Type       = typeof(MainAccount);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Classification":
                    _Type       = typeof(Classification);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "SubClassification":
                    _Type       = typeof(SubClassification);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Equipment":
                    _Type       = typeof(Equipment);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Building":
                    _Type       = typeof(Building);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormAccountingUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }
        private void ListFormHRISUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "Employee":
                    _Type       = typeof(Employee);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "EmploymentType":
                    _Type       = typeof(EmploymentType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Designation":
                    _Type       = typeof(Designation);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Department":
                    _Type       = typeof(Department);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "LeaveType":
                    _Type       = typeof(LeaveType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Holiday":
                    _Type       = typeof(Holiday);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "WorkSchedule":
                    _Type       = typeof(WorkSchedule);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormHRISUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }
Example #6
0
        private void AuditTrailUI_Load(object sender, EventArgs e)
        {
            Type _Type = typeof(AuditTrail);

            FieldInfo[] myFieldInfo;
            myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                          | BindingFlags.Public);
            loSearches = new SearchesUI(myFieldInfo, _Type, "tsmAuditTrail");
        }
        private void WarehouseWithdrawalUI_Load(object sender, EventArgs e)
        {
            Type _Type = typeof(InventoryHeader);

            FieldInfo[] myFieldInfo;
            myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                          | BindingFlags.Public);
            loSearches = new SearchesUI(myFieldInfo, _Type, "tsmStockWithdrawal");
        }
        private void ListFormLendingUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "Client":
                    _Type       = typeof(Client);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Area":
                    _Type       = typeof(Area);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Branch":
                    _Type       = typeof(Branch);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Zone":
                    _Type       = typeof(Zone);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Collector":
                    _Type       = typeof(Collector);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Product":
                    _Type       = typeof(Product);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormLendingUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }
 private void GeneralJournalUI_Load(object sender, EventArgs e)
 {
     try
     {
         Type        _Type = typeof(JournalEntry);
         FieldInfo[] myFieldInfo;
         myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                       | BindingFlags.Public);
         loSearches = new SearchesUI(myFieldInfo, _Type, "tsmGeneralJournal");
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "GeneralJournalUI_Load");
         em.ShowDialog();
         return;
     }
 }
 private void UserGroupListUI_Load(object sender, EventArgs e)
 {
     try
     {
         Type        _Type;
         FieldInfo[] myFieldInfo;
         _Type       = typeof(UserGroup);
         myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
         loSearches  = new SearchesUI(myFieldInfo, _Type, "tsmUserGroup");
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormSystemUI_Load");
         em.ShowDialog();
         Application.Exit();
     }
 }
Example #11
0
 private void PurchaseRequestUI_Load(object sender, EventArgs e)
 {
     try
     {
         Type        _Type = typeof(PurchaseRequest);
         FieldInfo[] myFieldInfo;
         myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                       | BindingFlags.Public);
         loSearches        = new SearchesUI(myFieldInfo, _Type, "tsmPurchaseRequest");
         loSearches.lQuery = "";
     }
     catch (Exception ex)
     {
         ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "PurchaseRequestUI_Load");
         em.ShowDialog();
         return;
     }
 }
        private void ListFormPayrollUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "EarningType":
                    _Type       = typeof(EarningType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "DeductionType":
                    _Type       = typeof(DeductionType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "TaxType":
                    _Type       = typeof(TaxType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "IncomeTaxTable":
                    _Type       = typeof(IncomeTaxTable);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormPayrollUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }
        private void LoanApplicationUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type = typeof(LoanApplication);
                FieldInfo[] myFieldInfo;
                myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                              | BindingFlags.Public);
                loSearches = new SearchesUI(myFieldInfo, _Type, "tsmLoanApplication");
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "LoanApplicationUI_Load");
                em.ShowDialog();
                return;
            }

            cboBranch.DataSource    = loBranch.getAllData("ViewAll", "", "");
            cboBranch.DisplayMember = "Description";
            cboBranch.ValueMember   = "Id";
            cboBranch.SelectedIndex = -1;
        }
        private void StockAdjustmentUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type = typeof(Inventory);
                FieldInfo[] myFieldInfo;
                myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance
                                              | BindingFlags.Public);
                loSearches = new SearchesUI(myFieldInfo, _Type, "tsmStockAdjustment");

                cboInventoryType.DataSource    = loInventoryType.getAllData("ViewAll", "", "");
                cboInventoryType.ValueMember   = "Id";
                cboInventoryType.DisplayMember = "Description";
                cboInventoryType.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "StockAdjustmentUI_Load");
                em.ShowDialog();
                return;
            }
        }
Example #15
0
        private void ListFormInventoryUI_Load(object sender, EventArgs e)
        {
            try
            {
                Type        _Type;
                FieldInfo[] myFieldInfo;
                switch (lType.Name)
                {
                case "Customer":
                    _Type       = typeof(Customer);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Supplier":
                    _Type       = typeof(Supplier);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "InventoryGroup":
                    _Type       = typeof(InventoryGroup);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Category":
                    _Type       = typeof(Category);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Stock":
                    _Type       = typeof(Stock);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Unit":
                    _Type       = typeof(Unit);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "InventoryType":
                    _Type       = typeof(InventoryType);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;

                case "Location":
                    _Type       = typeof(Location);
                    myFieldInfo = _Type.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
                    loSearches  = new SearchesUI(myFieldInfo, _Type, "tsm" + _Type.Name);
                    break;
                }
            }
            catch (Exception ex)
            {
                ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "ListFormInventoryUI_Load");
                em.ShowDialog();
                Application.Exit();
            }
        }