Example #1
0
        private void txtName_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                switch (e.KeyData)
                {
                case Keys.Enter:

                    //Al presionar tecla ENTER
                    if (!String.IsNullOrWhiteSpace(txtDate.Text))
                    {
                        //txtPrice.Focus();
                    }
                    else
                    {
                        Msg.Adv("Ingresar el Nombre");
                    }

                    break;

                case Keys.Escape:

                    //Al presionar tecla ESCAPE
                    txtCode.Focus();

                    break;
                }
            }
            catch (Exception ex)
            {
                Msg.Err(ex.Message);
            }
        }
Example #2
0
        private void Validation()
        {
            if (String.IsNullOrWhiteSpace(txtCode.Text.Trim()))
            {
                Msg.Adv("Ingresar el Código");
                txtCode.Focus();
                return;
            }

            if (String.IsNullOrWhiteSpace(txtDate.Text.Trim()))
            {
                Msg.Adv("Ingresar el Nombre");
                txtCode.Focus();
                return;
            }
        }
Example #3
0
 public void Find(Guid CustomerID)
 {
     try
     {
         var p = RuleCustomer.Find(CustomerID);
         if (p != null)
         {
             this._Customer = p;
         }
         else
         {
             Msg.Adv("El cliente no fue encontrado.");
         }
     }
     catch (Exception ex)
     {
         Msg.Err(ex.Message);
     }
 }
Example #4
0
 private void Delete()
 {
     try
     {
         if (this.Exist)
         {
             RuleProduct.Delete(this._Product.ProductID);
         }
         else
         {
             Msg.Adv("Seleccione un producto para eliminarlo.");
         }
         this.Clear();
     }
     catch (Exception ex)
     {
         Msg.Err(ex.Message);
     }
 }
Example #5
0
 public void Find(string Code)
 {
     try
     {
         var p = RuleProduct.Find(Code);
         if (p != null)
         {
             this._Product = p;
             this.ShowProductInControls();
         }
         else
         {
             Msg.Adv("Producto no encontrado.");
         }
     }
     catch (Exception ex)
     {
         Msg.Err(ex.Message);
     }
 }
Example #6
0
        private void txtCode_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                switch (e.KeyData)
                {
                case Keys.Enter:

                    //Al presionar tecla ENTER
                    if (!String.IsNullOrWhiteSpace(txtCode.Text))
                    {
                        var p = this.RuleProduct.Find(txtCode.Text);
                        if (p != null)
                        {
                            txtDate.Text        = p.ProductName;
                            cmbCliente.Text     = p.LineID != null ? p.Line.LineName : "";
                            txtDescription.Text = p.ProductDescription;
                        }
                        txtDate.Focus();
                    }
                    else
                    {
                        Msg.Adv("Ingresar el Código");
                    }

                    break;

                case Keys.Escape:

                    //Al presionar tecla ESCAPE


                    break;
                }
            }
            catch (Exception ex)
            {
                Msg.Err(ex.Message);
            }
        }