Esempio n. 1
0
 private void btnElegirProducto_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarProducto ElegirProducto = new frmSeleccionarProducto(7);
         ElegirProducto.Location = this.txtProducto.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             Producto Aux = ElegirProducto.Datos;
             Actual = Aux;
             this.txtProducto.Text = Aux.NombreProducto;
             this.txtCantidad.Focus();
         }
         else
         {
             this.Actual           = new Producto();
             this.txtProducto.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmNuevaClaveProduccion ~ btnElegirProducto_Click");
     }
 }
Esempio n. 2
0
 private void btnElegirServicio_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarProducto ElegirServicio = new frmSeleccionarProducto(2);
         ElegirServicio.Location = this.txtServicio.PointToScreen(new Point());
         ElegirServicio.Location = new Point(ElegirServicio.Location.X - 1, ElegirServicio.Location.Y - 2);
         ElegirServicio.ShowDialog();
         ElegirServicio.Dispose();
         if (ElegirServicio.DialogResult == DialogResult.OK)
         {
             Producto Aux = ElegirServicio.Datos;
             this._ServicioElegido = new Servicio {
                 IDServicio = Aux.IDProducto, NombreServicio = Aux.NombreProducto, TiempoMinutos = Aux.TiempoMinutos
             };
             this.btnElegirCliente.Focus();
         }
         else
         {
             this._ServicioElegido = new Servicio {
                 IDServicio = string.Empty, NombreServicio = string.Empty, TiempoMinutos = 0
             };
         }
         this.txtServicio.Text       = this._ServicioElegido.NombreServicio;
         this.txtTiempoServicio.Text = this._ServicioElegido.TiempoMinutos.ToString();
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmElegirServicioCita ~ btnElegirServicio_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void btnElegirProducto_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarProducto ElegirProducto = new frmSeleccionarProducto(9);
         ElegirProducto.Location = this.txtProducto.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             Producto Aux = ElegirProducto.Datos;
             this.CatalogoActual   = Aux;
             this.txtProducto.Text = Aux.NombreProducto;
             this.ExistenciasProducto(Comun.IDSucursalCaja, Aux.IDProducto);
             this.txtExistencia.Text = string.Format("{0:F0}", this._DatosProductos.Existencia);
             this.txtCantidadDisminuir.Focus();
         }
         else
         {
             this.CatalogoActual   = new Producto();
             this.txtProducto.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmDescontarExistencia ~ btnElegirProducto_Click");
     }
 }
Esempio n. 4
0
 private void btnElegirServicio_Click(object sender, EventArgs e)
 {
     try
     {
         Usuario AuxEmp = this.ObtenerDatosEmpleado();
         frmSeleccionarProducto ElegirServicio = new frmSeleccionarProducto(13);
         ElegirServicio.Location = this.txtCliente.PointToScreen(new Point());
         ElegirServicio.Location = new Point(ElegirServicio.Location.X - 1, ElegirServicio.Location.Y - 2);
         ElegirServicio.ShowDialog();
         ElegirServicio.Dispose();
         if (ElegirServicio.DialogResult == DialogResult.OK)
         {
             Producto Aux = ElegirServicio.Datos;
             this.DatosServicio   = Aux;
             this.txtCliente.Text = Aux.NombreProducto;
             this.LlenarGridProductos(AuxEmp.IDEmpleado, this.DatosServicio.IDProducto);
         }
         else
         {
             this.DatosServicio   = new Producto();
             this.txtCliente.Text = string.Empty;
             this.LlenarGridProductos(AuxEmp.IDEmpleado, this.DatosServicio.IDProducto);
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmNuevoServicioTicket ~ btnElegirServicio_Click");
     }
 }
Esempio n. 5
0
 private void btnElegirProducto_Click(object sender, EventArgs e)
 {
     try
     {
         int TipoForm = 0;
         if (string.IsNullOrEmpty(this.ObtenerEmpleado().IDEmpleado))
         {
             TipoForm = 8;
         }
         else
         {
             TipoForm = 6;
         }
         frmSeleccionarProducto ElegirProducto = new frmSeleccionarProducto(TipoForm);
         ElegirProducto.Location = this.txtProducto.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             Producto Aux = ElegirProducto.Datos;
             Actual = Aux;
             this.txtProducto.Text = Aux.NombreProducto;
             this.CargarComboClaves();
             this.btnGuardar.Focus();
         }
         else
         {
             this.CargarComboClaves();
             this.Actual           = new Producto();
             this.txtProducto.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmNuevoPedidoProducto ~ btnElegirProducto_Click");
     }
 }
 private void btnElegirUsos_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarProducto ElegirProducto = new frmSeleccionarProducto(12);
         ElegirProducto.Location = this.txtProductoUsos.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             this.ActualUsos            = ElegirProducto.Datos;
             this.txtProductoUsos.Text  = this.ActualUsos.NombreProducto;
             this.txtMetrica.Text       = this.ActualUsos.MetricaDesc;
             this.numCantidadUsos.Value = 1;
             this.LlenarComboClaves(this.ActualUsos.IDProducto);
             this.cmbClavesProduccion.Focus();
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmTicketDetalleProductosXServicio ~ btnElegirProducto_Click");
     }
 }
 private void btnElegirProducto_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarProducto ElegirProducto = new frmSeleccionarProducto(11);
         ElegirProducto.Location = this.txtProducto.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             this.Actual                    = ElegirProducto.Datos;
             this.txtProducto.Text          = this.Actual.NombreProducto;
             this.NumCantidadProducto.Value = 1;
             if (this.Actual.IDTipoProducto == 1)
             {
                 this.lblPrecio.Visible            = false;
                 this.txtPrecio.Visible            = false;
                 this.NumCantidadProducto.ReadOnly = false;
                 this.NumCantidadProducto.Focus();
             }
             else
             {
                 this.lblPrecio.Visible            = true;
                 this.txtPrecio.Visible            = true;
                 this.txtPrecio.Text               = string.Format("{0:c}", 0);
                 this.NumCantidadProducto.ReadOnly = true;
                 this.txtPrecio.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmTicketDetalleProductosXServicio ~ btnElegirProducto_Click");
     }
 }