Beispiel #1
0
        private void _Bt_Generar_Click(object sender, EventArgs e)
        {
            Frm_NotaDebito _Frm = new Frm_NotaDebito(true, _Txt_NR.Text.Trim(), _Str_Proveedor, _Str_NombProveedor);

            _Frm.Name      = "NotaDebito_Temp";
            _Frm.MdiParent = this.MdiParent;
            _Frm.Show();
            ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_nuevo2.PerformClick();
            this.Close();
        }
Beispiel #2
0
 private void _Dg_Datagrid_DoubleClick(object sender, EventArgs e)
 {
     if (_Dg_Datagrid.Rows.Count > 0)
     {
         string  _Str_Cadena = "";
         DataSet _Ds         = new DataSet();
         this.Cursor = Cursors.WaitCursor;
         if (_Int_Form == 1)
         {
             _Str_Cadena = "Select cproveedor,cidrecepcion,cnumdocu,cfechadocu from vst_consultanotarecepcionmaestra where cgroupcomp='" + Frm_Padre._Str_GroupComp + "' and ccompany='" + Frm_Padre._Str_Comp + "' and cidnotrecepc='" + _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString() + "'";
             _Ds         = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_Str_Cadena);
             if (_Ds.Tables[0].Rows.Count > 0)
             {
                 Frm_NotaRecepcion _Frm = new Frm_NotaRecepcion(_Ds.Tables[0].Rows[0][0].ToString(), _Ds.Tables[0].Rows[0][1].ToString(), _Ds.Tables[0].Rows[0][2].ToString(), _Ds.Tables[0].Rows[0][3].ToString(), true);
                 _Frm.MdiParent = this.MdiParent;
                 _Frm.Show();
             }
         }
         if (_Int_Form == 2)
         {
             _Str_Cadena = "Select cidnotadebitocxp,cproveedor,cnumdocu from TNOTADEBITOCP where cgroupcomp='" + Frm_Padre._Str_GroupComp + "' and ccompany='" + Frm_Padre._Str_Comp + "' and cidnotadebitocxp='" + _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString() + "'";
             _Ds         = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_Str_Cadena);
             if (_Ds.Tables[0].Rows.Count > 0)
             {
                 Frm_NotaDebito _Frm = new Frm_NotaDebito(_Ds.Tables[0].Rows[0][0].ToString(), _Ds.Tables[0].Rows[0][1].ToString(), _Ds.Tables[0].Rows[0][2].ToString());
                 _Frm.MdiParent = this.MdiParent;
                 _Frm.Show();
             }
         }
         if (_Int_Form == 3)
         {
             _Str_Cadena = "Select cidnotacreditocxp,cproveedor,cnumdocu from TNOTACREDICP where cgroupcomp='" + Frm_Padre._Str_GroupComp + "' and ccompany='" + Frm_Padre._Str_Comp + "' and cidnotacreditocxp='" + _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString() + "'";
             _Ds         = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_Str_Cadena);
             if (_Ds.Tables[0].Rows.Count > 0)
             {
                 Frm_NotaCredito _Frm = new Frm_NotaCredito(_Ds.Tables[0].Rows[0][0].ToString(), _Ds.Tables[0].Rows[0][1].ToString(), _Ds.Tables[0].Rows[0][2].ToString());
                 _Frm.MdiParent = this.MdiParent;
                 _Frm.Show();
             }
         }
         if (_Int_Form == 4)
         {
             _Str_Cadena = "Select cproveedor,cidrecepcion,cnumdocu,cfechadocu from vst_consultanotarecepcionmaestra where cgroupcomp='" + Frm_Padre._Str_GroupComp + "' and ccompany='" + Frm_Padre._Str_Comp + "' and cidnotrecepc='" + _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString() + "'";
             _Ds         = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_Str_Cadena);
             if (_Ds.Tables[0].Rows.Count > 0)
             {
                 Frm_NotaRecepcion _Frm = new Frm_NotaRecepcion(_Ds.Tables[0].Rows[0][0].ToString(), _Ds.Tables[0].Rows[0][1].ToString(), _Ds.Tables[0].Rows[0][2].ToString(), _Ds.Tables[0].Rows[0][3].ToString(), 1);
                 _Frm.MdiParent = this.MdiParent;
                 _Frm.Show();
             }
         }
         this.Cursor = Cursors.Default;
         this.Close();
     }
 }