Ejemplo n.º 1
0
        void Modificar()
        {
            n_QueHace = 2;
            Tab1.TabPages[0].Enabled = false;
            Blanquea();
            Bloquea();
            ActivarTool();

            int intIdRegistro = Convert.ToInt32(DgLista.Columns["n_id"].CellValue(DgLista.Row).ToString());

            VerRegistro(intIdRegistro);
            LblTitulo2.Text    = "Modificando Registro";
            Tab1.SelectedIndex = 1;
            DataTable dtres = new DataTable();

            // OBTENEMOS EL ID DE LA CUENTA DEL DOCUMENTO
            dtres = funDatos.DataTableFiltrar(dtdoc, "n_idtipdoc = 21 AND n_idmon = " + Convert.ToInt32(CboMon.SelectedValue).ToString() + " AND n_idemp = " + STU_SISTEMA.EMPRESAID.ToString() + "");
            if (dtres.Rows.Count != 0)
            {
                N_CTADOC = Convert.ToInt32(dtres.Rows[0]["n_idcueven"]);
            }


            // OBTENEMOS EL ID DE LA CUENTA DEL IGV
            dtres = funDatos.DataTableFiltrar(dtdocimp, "n_idtipdoc = 21 AND n_idemp = " + STU_SISTEMA.EMPRESAID.ToString() + "");
            if (dtres.Rows.Count != 0)
            {
                N_CTAIGV = Convert.ToInt32(dtres.Rows[0]["n_idcueven"]);
            }
            TxtTc.Focus();
        }
Ejemplo n.º 2
0
        void Nuevo()
        {
            n_QueHace = 1;
            Tab1.TabPages[0].Enabled = false;
            Blanquea();
            Bloquea();
            ActivarTool();
            LblTitulo2.Text      = "Agregando Nuevo Registro";
            Tab1.SelectedIndex   = 1;
            CboMon.SelectedValue = 115;

            DataTable dtres = new DataTable();

            // OBTENEMOS EL ID DE LA CUENTA DEL DOCUMENTO
            dtres = funDatos.DataTableFiltrar(dtdoc, "n_idtipdoc = 21 AND n_idmon = " + Convert.ToInt32(CboMon.SelectedValue).ToString() + " AND n_idemp = " + STU_SISTEMA.EMPRESAID.ToString() + "");
            if (dtres.Rows.Count != 0)
            {
                N_CTADOC = Convert.ToInt32(dtres.Rows[0]["n_idcueven"]);
            }


            // OBTENEMOS EL ID DE LA CUENTA DEL IGV
            dtres = funDatos.DataTableFiltrar(dtdocimp, "n_idtipdoc = 21 AND n_idemp = " + STU_SISTEMA.EMPRESAID.ToString() + "");
            if (dtres.Rows.Count != 0)
            {
                N_CTAIGV = Convert.ToInt32(dtres.Rows[0]["n_idcueven"]);
            }
            TxtTc.Focus();
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (LblIdPro.Text == "")
            {
                MessageBox.Show("¡ No ha especificado el nombre del cliente !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                CmdBusCli.Focus();
                return;
            }
            if (Convert.ToInt32(CboTipRet.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado el tipo de retencion que se aplicara !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                CboTipRet.Focus();
                return;
            }
            if (Convert.ToInt32(CboMon.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la moneda !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                CboMon.Focus();
                return;
            }
            if (TxtTc.Text == "")
            {
                MessageBox.Show("¡ No ha especificado el tipo de cambio !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                TxtTc.Focus();
                return;
            }

            MostrarDocVenta();
        }
Ejemplo n.º 4
0
        private void BtnEkle_Click(object sender, EventArgs e)
        {
            baglantii.Open();
            SqlCommand komut = new SqlCommand("insert into UcretBorc(HastaAdi,HastaTelefon,Tc,IlacAdi,Tarih,TeslimAlan,Ucret,ITS)values (@adi,@tel,@tci,@ilacismi,@tarihi,@teslim,@fiyat,@its)", baglantii);

            komut.Parameters.AddWithValue("@adi", TxtHastaAdi.Text);
            komut.Parameters.AddWithValue("@tel", TxtHastaTel.Text);
            komut.Parameters.AddWithValue("@tci", TxtTc.Text);
            komut.Parameters.AddWithValue("@ilacismi", TxtIlacAdi.Text);
            komut.Parameters.AddWithValue("@tarihi", TxtTarih.Text);
            komut.Parameters.AddWithValue("@teslim", TxtAlan.Text);
            komut.Parameters.AddWithValue("@fiyat", TxtUcret.Text);
            komut.Parameters.AddWithValue("@its", TxtIts.Text);
            komut.ExecuteNonQuery();
            verilerigoster("Select * from UcretBorc");
            baglantii.Close();
            TxtHastaAdi.Clear();
            TxtHastaTel.Clear();
            TxtTc.Clear();
            TxtIlacAdi.Clear();
            TxtTarih.Clear();
            TxtAlan.Clear();
            TxtUcret.Clear();
            TxtIts.Clear();
            TxtHastaAdi.Focus();
        }
Ejemplo n.º 5
0
        bool CamposOK()
        {
            bool booEstado = true;

            if (TxtPro.Text == "")
            {
                MessageBox.Show("¡ No ha especificado el nombre del proveedor !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtPro.Focus();
                return(booEstado);
            }
            if (TxtNumSer.Text == "")
            {
                MessageBox.Show("¡ No ha especificado el numero de serie de la retencion !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtNumSer.Focus();
                return(booEstado);
            }
            if (TxtNumDoc.Text == "")
            {
                MessageBox.Show("¡ No ha especificado el numero de documento de la retencion !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtNumDoc.Focus();
                return(booEstado);
            }

            if (Convert.ToInt32(CboMon.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado la moneda de la retencion !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboMon.Focus();
                return(booEstado);
            }
            if (Convert.ToInt32(CboTipRet.SelectedValue) == 0)
            {
                MessageBox.Show("¡ No ha especificado el tipo de retencion !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                CboTipRet.Focus();
                return(booEstado);
            }

            if (Convert.ToDouble(TxtTot2.Text) == 0)
            {
                MessageBox.Show("¡ El importe de la retencion no puede ser 0 !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtTot2.Focus();
                return(booEstado);
            }
            if (Convert.ToDouble(TxtTc.Text) == 0)
            {
                MessageBox.Show("¡ El tipo de cambio no puede ser 0 !", "", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                booEstado = false;
                TxtTc.Focus();
                return(booEstado);
            }
            return(booEstado);
        }
Ejemplo n.º 6
0
 private void btnTemizle_Click(object sender, EventArgs e)
 {
     TxtAdi.Clear();
     TxtSoyadi.Clear();
     MskTxtTelefon.Clear();
     CboxCinsiyet.Text = "";
     TxtMail.Clear();
     TxtTc.Clear();
     TxtOdaNo.Clear();
     txtSifre.Clear();
 }
 private void button1_Click_1(object sender, EventArgs e)
 {
     TxtAdi.Clear();
     TxtSoyadi.Clear();
     comboBox1.Text = "";
     MskTxtTelefon.Clear();
     TxtEmail.Text = "";
     TxtTc.Clear();
     TxtOdano.Clear();
     TxtUcret.Clear();
     Dtpgiris.Text = "";
     Dtpcikis.Text = "";
 }
Ejemplo n.º 8
0
 private void BtnTemizle_Click(object sender, EventArgs e)
 {
     TxtAdi.Clear();
     TxtSoyadi.Clear();
     comboBox1.Text     = "";
     MskTxtTelefon.Text = "";
     TxtMail.Clear();
     TxtTc.Clear();
     TxtOdaNo.Clear();
     TxtUcret.Clear();
     DtpGirisTarihi.Text = "";
     DtpCikisTarihi.Text = "";
 }
Ejemplo n.º 9
0
        void Modificar()
        {
            n_QueHace = 2;
            Tab1.TabPages[0].Enabled = false;
            Blanquea();
            Bloquea();
            ActivarTool();

            int intIdRegistro = Convert.ToInt32(DgLista.Columns["n_id"].CellValue(DgLista.Row).ToString());

            VerRegistro(intIdRegistro);
            LblTitulo2.Text    = "Modificando Registro";
            Tab1.SelectedIndex = 1;
            TxtTc.Focus();
        }
Ejemplo n.º 10
0
        private void BtnEkle_Click(object sender, EventArgs e)
        {
            baglantii.Open();
            SqlCommand komut = new SqlCommand("insert into ItsIlac(IlacAdi,AdSoyad,Tc,Tarih,ITSkodu)values (@ilacismi,@adi,@tci,@tarihi,@its)", baglantii);

            komut.Parameters.AddWithValue("@ilacismi", TxtIlacAdi.Text);
            komut.Parameters.AddWithValue("@Adi", TxtIsım.Text);
            komut.Parameters.AddWithValue("@tci", TxtTc.Text);
            komut.Parameters.AddWithValue("@tarihi", TxtTarih.Text);
            komut.Parameters.AddWithValue("@its", TxtIts.Text);
            komut.ExecuteNonQuery();
            verilerigoster("Select * from ItsIlac");
            baglantii.Close();
            TxtIlacAdi.Clear();
            TxtIsım.Clear();
            TxtTc.Clear();
            TxtTarih.Clear();
            TxtIts.Clear();
            TxtIlacAdi.Focus();
        }