示例#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 simpleButton1_Click(object sender, EventArgs e)
        {
            StringBuilder filtro = new StringBuilder();

            if (F.toString(edCLI_ID.EditValue) != "")
            {
                filtro.Append(" AND CLI_ID = '" + F.toInt(edCLI_ID.EditValue) + "' ");
            }
            if (F.toString(edPET_ID.EditValue) != "")
            {
                filtro.Append(" AND PET_ID = '" + F.toInt(edPET_ID.EditValue) + "' ");
            }
            if (F.toString(edSER_DATA_CAD.EditValue) != "")
            {
                filtro.Append(" AND SER_DATA_CAD = '" + F.toString(edSER_DATA_CAD.EditValue) + "' ");
            }
            if (F.toString(edSER_VALOR_TOTAL.EditValue) != "")
            {
                filtro.Append(" AND SER_VALOR_TOTAL = '" + F.toDouble(edSER_VALOR_TOTAL.EditValue) + "' ");
            }
            if (F.toString(edTIPO_SER_ID.EditValue) != "")
            {
                filtro.Append(" AND TIPO_SER_ID = '" + F.toInt(edTIPO_SER_ID.EditValue) + "' ");
            }
            if (F.toString(cbEstagio.EditValue) != "")
            {
                filtro.Append(" AND SER_ESTAGIO = '" + F.toString(cbEstagio.EditValue) + "' ");
            }
            List <Servicos> listServico = new List <Servicos>();

            listServico = Servicos.Get(filtro.ToString());
            gridControlServicos.DataSource = listServico;
        }
示例#3
0
 private void FrmServicos_Load(object sender, EventArgs e)
 {
     edTIPO_SER.Properties.DataSource    = TipoServico.Get();
     edTIPO_SER.Properties.ValueMember   = "TIPO_SER_ID";
     edTIPO_SER.Properties.DisplayMember = "TIPO_SER_NOME";
     if (SERID != 0)
     {
         altser                         = Servicos.Get(SERID);
         edCLI_ID.EditValue             = F.toInt(altser.CLI_ID);
         edPET_ID.EditValue             = F.toInt(altser.PET_ID);
         edSER_DATA_PREV.EditValue      = Convert.ToDateTime(altser.SER_DATA_PREV);
         edSER_OBSERVACAO.EditValue     = F.toString(altser.SER_OBSERVACAO);
         edSER_VALOR_BASE.EditValue     = F.toDouble(altser.SER_VALOR_BASE);
         edSER_VALOR_DESCONTO.EditValue = F.toDouble(altser.SER_VALOR_DESCONTO);
         edTIPO_SER.EditValue           = F.toDouble(altser.SER_VALOR_TOTAL);
         cbEstagio.EditValue            = F.toString(altser.SER_ESTAGIO);
         edTIPO_SER.EditValue           = F.toInt(altser.TIPO_SER_ID);
         btnCadastrar.Text              = "Atualizar";
         data = F.toString(altser.SER_DATA_CAD);
     }
 }