示例#1
0
        private void SH_SERVICOS_Load(object sender, EventArgs e)
        {
            gridControlServicos.DataSource = Servicos.Get();
            repositoryItemGridLookUpEditClientes.DataSource    = Clientes.Get();
            repositoryItemGridLookUpEditClientes.ValueMember   = "CLI_ID";
            repositoryItemGridLookUpEditClientes.DisplayMember = "CLI_RAZAO";

            repositoryItemGridLookUpEditTipoSer.DataSource    = TipoServico.Get();
            repositoryItemGridLookUpEditTipoSer.ValueMember   = "TIPO_SER_ID";
            repositoryItemGridLookUpEditTipoSer.DisplayMember = "TIPO_SER_NOME";

            repositoryItemGridLookUpEditPets.DataSource    = Pets.Get();
            repositoryItemGridLookUpEditPets.ValueMember   = "PET_ID";
            repositoryItemGridLookUpEditPets.DisplayMember = "PET_NOME";

            edPET_ID.Properties.DataSource    = Pets.Get();
            edPET_ID.Properties.ValueMember   = "PET_ID";
            edPET_ID.Properties.DisplayMember = "PET_NOME";

            edCLI_ID.Properties.DataSource    = Clientes.Get();
            edCLI_ID.Properties.ValueMember   = "CLI_ID";
            edCLI_ID.Properties.DisplayMember = "CLI_RAZAO";

            edTIPO_SER_ID.Properties.DataSource    = TipoServico.Get();
            edTIPO_SER_ID.Properties.ValueMember   = "TIPO_SER_ID";
            edTIPO_SER_ID.Properties.DisplayMember = "TIPO_SER_NOME";
        }
示例#2
0
        private void btnPesq_Click(object sender, EventArgs e)
        {
            StringBuilder filtro = new StringBuilder();

            if (F.toInt(edCLI_ID.EditValue) != 0)
            {
                filtro.Append(" AND CLI_ID = '" + F.toInt(edCLI_ID.EditValue) + "' ");
            }
            if (F.toString(edPET_COR.EditValue) != "")
            {
                filtro.Append(" AND PET_COR = '" + F.toString(edPET_COR.EditValue) + "' ");
            }
            if (F.toString(edPET_NAS.EditValue) != "")
            {
                filtro.Append(" AND PET_NAS = '" + F.toString(edPET_NAS.EditValue) + "' ");
            }
            if (F.toString(edPET_RACA.EditValue) != "")
            {
                filtro.Append(" AND PET_RACA = '" + F.toInt(edPET_RACA.EditValue) + "' ");
            }
            if (F.toString(edPET_ID.EditValue) != "")
            {
                filtro.Append(" AND PET_ID = '" + F.toInt(edPET_ID.EditValue) + "' ");
            }
            List <Pets> listPet = new List <Pets>();

            listPet = Pets.Get(filtro.ToString());
            gridControlPets.DataSource = listPet;
        }
示例#3
0
        private void removerToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            int PETID = F.toInt(layoutView1.GetFocusedRowCellValue("PET_ID"));

            Pets.Delete(Pets.Get(PETID));
            SH_PETS_Load(null, null);
        }
示例#4
0
        private void SH_PETS_Load(object sender, EventArgs e)
        {
            gridControlPets.DataSource = Pets.Get();

            repositoryItemGridLookUpEditDono.DataSource    = Clientes.Get();
            repositoryItemGridLookUpEditDono.ValueMember   = "CLI_ID";
            repositoryItemGridLookUpEditDono.DisplayMember = "CLI_RAZAO";

            edCLI_ID.Properties.DataSource    = Clientes.Get();
            edCLI_ID.Properties.ValueMember   = "CLI_ID";
            edCLI_ID.Properties.DisplayMember = "CLI_RAZAO";

            edPET_ID.Properties.DataSource    = Pets.Get();
            edPET_ID.Properties.ValueMember   = "PET_ID";
            edPET_ID.Properties.DisplayMember = "PET_NOME";

            edPET_RACA.Properties.DataSource    = Racas.Get();
            edPET_RACA.Properties.ValueMember   = "PET_RACA_ID";
            edPET_RACA.Properties.DisplayMember = "PET_RACA_NOME";

            repositoryItemGridLookUpEditRaca.DataSource    = Racas.Get();
            repositoryItemGridLookUpEditRaca.ValueMember   = "PET_RACA_ID";
            repositoryItemGridLookUpEditRaca.DisplayMember = "PET_RACA_NOME";
        }