コード例 #1
0
        private void ListarPersonal()
        {
            try
            {
                EPersonalBandeja per = new EPersonalBandeja();
                if (psintypesel == 1)
                {
                    per.psintypesel = 1;
                    per.IdPersonal = txtCodigo.Text;
                    per.NuDocIden = txtdni.Text;
                    per.DsApellNom = txtapenom.Text;
                    DataSet ds = BPersonalBandeja.GetListFill(per);
                    dgpersonal.DataSource = ds.Tables[0];

                    lblnutot.Text = Convert.ToInt16(dgpersonal.RowCount).ToString();
                }
                else if(psintypesel == 2)
                {
                    per.psintypesel = 2;
                    per.IdPersonal = txtCodigo.Text;
                    per.NuDocIden = txtdni.Text;
                    per.DsApellNom = txtapenom.Text;

                    DataSet ds = BPersonalBandeja.GetListFill(per);
                    dgpersonal.DataSource = ds.Tables[0];
                    lblnutot.Text = Convert.ToInt16(dgpersonal.RowCount).ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void txtEntregadoPor_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == Convert.ToChar(Keys.Enter))
            {

                txtEntregadoPor.Text = txtEntregadoPor.Text.PadLeft(5, '0');
                EPersonalBandeja per = new EPersonalBandeja();
                per.psintypesel = 1;
                per.IdPersonal = txtEntregadoPor.Text;
                per.NuDocIden = "";
                per.DsApellNom = "";
                ComboBox cb = new ComboBox();

                List<Dato> oListDato = BPersonalBandeja.ObtenerDatoPersonal(per);
                if (oListDato.Count > 0)
                {
                    txtdsEntregadoPor.Text = oListDato[0].desc;
                    cb_almacen.Focus();
                }
                else

                {
                    MessageBox.Show("Personal no Existe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtEntregadoPor.Clear();
                    txtdsEntregadoPor.Clear();
                    txtEntregadoPor.Focus();
                }

            }
        }
コード例 #3
0
 public static List<Dato> ObtenerDatoPersonal(EPersonalBandeja PerBand)
 {
     return DPersonalBandeja.ObtenerDatoPersonal("RH_Personal_qry04", "idPersonal", "dsRazSocial", PerBand);
 }
コード例 #4
0
 public static DataSet GetListFill(EPersonalBandeja PerBand)
 {
     return DPersonalBandeja.GetList(PerBand);
 }
コード例 #5
0
        private void txtid_chofer_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == Convert.ToChar(Keys.Enter))
            {
                txtid_chofer.Text = txtid_chofer.Text.PadLeft(5, '0');
                EPersonalBandeja per = new EPersonalBandeja();
                per.psintypesel = 1;
                per.IdPersonal = txtid_chofer.Text;
                per.NuDocIden = "";
                per.DsApellNom = "";
                ComboBox cb = new ComboBox();

                List<Dato> oListDato = BPersonalBandeja.ObtenerDatoPersonal(per);
                if (oListDato.Count > 0)
                {
                    txtds_chofer.Text = oListDato[0].desc;
                    txtid_chofer.SelectionStart = 0;
                    txtid_chofer.SelectionLength = txtid_chofer.Text.Length;
                }
                else
                {
                    MessageBox.Show("Vendedor no Existe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtid_chofer.Clear();
                    txtds_chofer.Clear();
                    txtid_chofer.Focus();
                }

                txtnu_placa.Focus();
            }
        }
コード例 #6
0
        private void txtIdPedido_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == Convert.ToChar(Keys.Enter))

              {
              txtIdPedido.Text = txtIdPedido.Text.PadLeft(5, '0');
                EPersonalBandeja per = new EPersonalBandeja();
                per.psintypesel = 1;
                per.IdPersonal = txtIdPedido.Text;
                per.NuDocIden = "";
                per.DsApellNom = "";
                ComboBox cb = new ComboBox();

               List<Dato> oListDato = BPersonalBandeja.ObtenerDatoPersonal(per);
               if (oListDato.Count > 0) {

                   lblPedidoPor.Text = oListDato[0].desc;

               }

                txtUsadoEn.Focus();

            }
        }