public FormAccountRanges(DataValidation dataValidation)
 {
     this.dataValidation = dataValidation;
     InitializeComponent();
     this.dgvAccountRanges.AutoGenerateColumns = false;
     dgvAccountRanges.DataSource = this.dataValidation.selectAccountRangeByCompanyId((int)FormSelectCompany.selectedCompanyId);
 }
Exemplo n.º 2
0
 public FormAccounts(DataValidation dataValidation, AccountRangeDTO accountRange)
 {
     this.dataValidation = dataValidation;
     this.accountRange = accountRange;
     InitializeComponent();
     this.dgvAccounts.AutoGenerateColumns = false;
     this.updateDataGrid();
 }
Exemplo n.º 3
0
        static void Main()
        {
            DataValidation dataValidation = new DataValidation();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormSelectCompany(dataValidation));
        }
 public FormSelectCompany(DataValidation dataValidation)
 {
     this.dataValidation = dataValidation;
     InitializeComponent();
     this.dgvCompanies.AutoGenerateColumns = false;
     this.dgvCompanies.DataSource = this.dataValidation.selectCompanyByName(textBox1.Text);
     this.treeView1.ExpandAll();
 }
 public FormModifyAccountRangeTemplate(DataValidation dataValidation, AccountRangeTemplateDTO accountRange)
     : base(dataValidation)
 {
     this.accountRange = accountRange;
     InitializeComponent();
     this.Text = "Modificar rango de cuenta";
     this.bAccept.Text = "Modificar";
     this.enterDataCompany(accountRange);
 }
 public FormModifyCompany(DataValidation dataValidation, CompanyDTO company)
     : base(dataValidation)
 {
     InitializeComponent();
     bAccept.Text = "Modificar";
     cbDocumentType.Enabled = false;
     dtpPeriodFrom.Enabled = false;
     tbDocument.Enabled = false;
     this.company = (company.Clone() as CompanyDTO);
     enterDataCompany(this.company);
 }
Exemplo n.º 7
0
        public FormAddAccount(DataValidation dataValidation, AccountRangeDTO accountRange)
        {
            this.dataValidation = dataValidation;
            this.accountRange = accountRange;
            InitializeComponent();
            this.nudCode.Minimum = accountRange.CodeFrom;
            this.nudCode.Maximum = accountRange.CodeTo;

            this.validationsAccount = new Dictionary<Control, ErrorProvider>();
            this.validationsAccount.Add(tbName, epAccount);
        }
 public FormModifyAccount(DataValidation dataValidation, AccountRangeDTO accountRange, AccountDTO account)
     : base(dataValidation, accountRange)
 {
     this.account = account;
     InitializeComponent();
     this.Text = "Modificación de cuenta";
     this.bAccept.Text = "Modificar";
     this.nudCode.Value = account.Code;
     this.tbName.Text = account.Name;
     this.cbRegularizingAccount.Checked = account.RegularizingAccount;
 }
Exemplo n.º 9
0
 public FormAddCompany(DataValidation dataValidation)
 {
     this.dataValidation = dataValidation;
     InitializeComponent();
     this.cbDocumentType.DataSource = dataValidation.getDocumentTypes();
     this.dtpPeriodFrom.Value = DateTime.Now;
     this.validationsCompany = new Dictionary<Control, ErrorProvider>();
     this.validationsCompany.Add(tbName, epCompany);
     this.validationsCompany.Add(tbAddress, epCompany);
     this.validationsCompany.Add(nudZipCode, epCompany);
     this.validationsCompany.Add(dtpPeriodTo, epCompany);
     this.validationsCompany.Add(tbActivity, epCompany);
 }
        public FormAddAccountRangeTemplate(DataValidation dataValidation)
        {
            this.dataValidation = dataValidation;
            InitializeComponent();

            this.cbType.DataSource = dataValidation.getAccountTypes();
            this.validationsAccountRange = new Dictionary<Control, ErrorProvider>();
            this.validationsAccountRange.Add(tbName, epAccountRange);
            this.validationsAccountRange.Add(nudCodeFrom, epAccountRange);
            this.validationsAccountRange.Add(nudCodeTo, epAccountRange);
            this.validationsAccountRange.Add(cbType, epAccountRange);
            this.validationsAccountRange.Add(cbCurrent, epAccountRange);
        }
 public FormModifyJuridicPerson(DataValidation dataValidation, JuridicPersonTypeEnum type, JuridicPersonDTO juridicPerson)
     : base(dataValidation, type)
 {
     InitializeComponent();
     this.juridicPerson = juridicPerson;
     this.enterDataCompany(juridicPerson);
     if (type == JuridicPersonTypeEnum.Client)
     {
         this.Text = "Modificar cliente";
     }
     else if (type == JuridicPersonTypeEnum.Provider)
     {
         this.Text = "Modificar proveedor";
     }
     this.bAccept.Text = "Modificar";
 }
 public FormJuridicPersons(DataValidation dataValidation, JuridicPersonTypeEnum type)
 {
     this.dataValidation = dataValidation;
     InitializeComponent();
     this.dgvJuridicPersons.AutoGenerateColumns = false;
     this.juridicPersonType = type;
     if (type == JuridicPersonTypeEnum.Client)
     {
         this.Text = "Clientes";
     }
     else if (type == JuridicPersonTypeEnum.Provider)
     {
         this.Text = "Proveedores";
     }
     this.refreshJuridicPersons();
 }
        public FormAddJuridicPerson(DataValidation dataValidation, JuridicPersonTypeEnum juridicPersonType)
        {
            this.dataValidation = dataValidation;
            this.juridicPersonType = juridicPersonType;

            InitializeComponent();

            if (juridicPersonType == JuridicPersonTypeEnum.Client)
            {
                this.nudAccountCode.Value = this.dataValidation.selectAccountCodeAvailable(AccountRangeTemplatesEnum.CREDITOS_COMERCIALES, (int)FormSelectCompany.selectedCompanyId);
            }
            else if (juridicPersonType == JuridicPersonTypeEnum.Provider)
            {
                this.nudAccountCode.Value = this.dataValidation.selectAccountCodeAvailable(AccountRangeTemplatesEnum.DEUDAS_COMERCIALES, (int)FormSelectCompany.selectedCompanyId);
            }
            this.cbLocation.DataSource = dataValidation.getLocations();
            this.cbDocumentType.DataSource = dataValidation.getDocumentTypes();
            this.cbConditionRegardingVat.DataSource = dataValidation.getConditionRegardingVats();

            this.validationsJuridicPerson = new Dictionary<Control, ErrorProvider>();
            this.validationsJuridicPerson.Add(tbBusinessName, epJuridicPerson);
            this.validationsJuridicPerson.Add(tbDocument, epJuridicPerson);
            this.validationsJuridicPerson.Add(cbDocumentType, epJuridicPerson);
            this.validationsJuridicPerson.Add(cbLocation, epJuridicPerson);
            this.validationsJuridicPerson.Add(cbConditionRegardingVat, epJuridicPerson);
            this.validationsJuridicPerson.Add(nudZipCode, epJuridicPerson);
            this.validationsJuridicPerson.Add(tbPhone, epJuridicPerson);
            this.validationsJuridicPerson.Add(tbAddress, epJuridicPerson);

            string juridicPersonTitle = null;
            if (juridicPersonType == JuridicPersonTypeEnum.Client)
                juridicPersonTitle = "cliente";
            else if (juridicPersonType == JuridicPersonTypeEnum.Provider)
                juridicPersonTitle = "proveedor";
            this.Text = "Registrar nuevo " + juridicPersonTitle;
        }
Exemplo n.º 14
0
 public FormMenu(DataValidation dataValidation)
 {
     this.dataValidation = dataValidation;
     InitializeComponent();
 }