Пример #1
0
        internal void UserControl_Loaded()
        {
            try {
                UIComboBox.banksForFilter(chequeManager.comboBox_bank_filter);
                chequeManager.comboBox_bank_filter.SelectedIndex = 0;
                UIComboBox.banksForSelect(chequeManager.comboBox_bank_update);
                UIComboBox.chequeStatus(chequeManager.comboBox_status_filter);
                chequeManager.comboBox_status_filter.SelectedIndex = 0;
                UIComboBox.chequeStatus(chequeManager.comboBox_status_update);
                chequeManager.comboBox_status_update.SelectedIndex = 0;

                chequeManager.DataTable = new DataTable();
                chequeManager.DataTable.Columns.Add("ID", typeof(int));
                chequeManager.DataTable.Columns.Add("Bank Name", typeof(String));
                chequeManager.DataTable.Columns.Add("Cheque Number", typeof(String));
                chequeManager.DataTable.Columns.Add("Issued Date", typeof(String));
                chequeManager.DataTable.Columns.Add("Payable Date", typeof(String));
                chequeManager.DataTable.Columns.Add("Amount", typeof(String));
                chequeManager.DataTable.Columns.Add("Notes", typeof(String));
                chequeManager.DataTable.Columns.Add("Status", typeof(String));

                chequeManager.DataGridFooter   = new DataGridFooter();
                chequeManager.dataGrid.IFooter = chequeManager.DataGridFooter;
                chequeManager.grid_footer.Children.Add(chequeManager.DataGridFooter);
                chequeManager.dataGrid.DataContext = chequeManager.DataTable.DefaultView;

                chequeManager.Pagination        = new Pagination();
                chequeManager.Pagination.Filter = chequeManager;
                chequeManager.grid_pagination.Children.Add(chequeManager.Pagination);
                setRowsCount();
            } catch (Exception) {
            }
        }
 internal void addBank_addBank()
 {
     if (bankManagerImpl.addbankPopup())
     {
         UIComboBox.banksForSelect(mSComboBox);
         mSComboBox.SelectedValue = addBank.AddedId;
         addBank.Hide();
         addBank.resetForm();
     }
 }