示例#1
0
 public List<belCampoPesquisa> PesquisaNotasRef(int iOperador, int iModelo, string _campoPesquisa, string sfiltro)
 {
     List<belCampoPesquisa> lCampoPesquisa = new List<belCampoPesquisa>();
     foreach (DataRow dr in BuscaNotas(iOperador, iModelo, _campoPesquisa, sfiltro).Rows)
     {
         belCampoPesquisa objCampo = new belCampoPesquisa();
         objCampo.ChaveAcesso = dr["CHAVE"].ToString();
         objCampo.NumeroNF = dr["nNF"].ToString();
         objCampo.SeqNF = dr["NFSEQ"].ToString();
         objCampo.sCli_For = dr["nm_clifornor"].ToString();
         objCampo.cUF = dr["cUF"].ToString();
         objCampo.AAMM = dr["AAMM"].ToString();
         objCampo.CNPJ = dr["CNPJ"].ToString();
         objCampo.serie = dr["serie"].ToString();
         lCampoPesquisa.Add(objCampo);
     }
     return lCampoPesquisa;
 }
示例#2
0
        private void dgvPesquisa_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {

            if (e.RowIndex > -1)
            {
                objbelCampoPesquisa = new belCampoPesquisa();
                objbelCampoPesquisa = objbelCampoPesquisa.RetornaCampoSelecionado((dgvPesquisa.DataSource as List<belCampoPesquisa>), dgvPesquisa[1, e.RowIndex].Value.ToString());
                this.Close();
            }

        }
示例#3
0
        private void btnPesquisarNF_Click(object sender, EventArgs e)
        {
            frmPesquisaNfe frm = new frmPesquisaNfe();
            frm.ShowDialog();
            belCampoPesquisa objbelCampoPesquisa = frm.objbelCampoPesquisa;

            if (objbelCampoPesquisa != null)
            {
                if (objbelCampoPesquisa.ChaveAcesso != "")
                {
                    txtChaveAcesso.Text = objbelCampoPesquisa.ChaveAcesso;
                    tabControl1.SelectedTab = tabPageRefNfe;
                }
                else
                {
                    txtnNFref.Text = objbelCampoPesquisa.NumeroNF;
                    txtClifor.Text = objbelCampoPesquisa.sCli_For;
                    txtCNPJ.Text = objbelCampoPesquisa.CNPJ;
                    txtcUF.Text = objbelCampoPesquisa.cUF;
                    txtserieRef.Text = objbelCampoPesquisa.serie;
                    txtAAMM.Text = Convert.ToDateTime(objbelCampoPesquisa.AAMM).ToString("dd/MM/yyyy");
                    tabControl1.SelectedTab = tabPageRefNotaA1;
                }
                objbelCampoPesquisa = new belCampoPesquisa();
            }
        }