Created
May 17, 2014 23:41
-
-
Save Fhernd/07657a18cab01890b344 to your computer and use it in GitHub Desktop.
Representa a un control en donde el usuario puede solicitar el cambio del salario.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Encabezado de comentarios | |
// Adaptación de: http://cupi2.uniandes.edu.co/sitio/index.php/cursos/apo1/nivel-1/el-empleado/visualizacion-codigo/panelsalario | |
// ===++=== | |
// | |
// OrtizOL | |
// | |
// ===--=== | |
/*============================================================ | |
// | |
// Clase: ControlSalario.cs | |
// | |
// Propósito: Control personalizado con los controles | |
// relacionados con el salario de un empleado. | |
// | |
============================================================*/ | |
#endregion | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Data; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using N1_Empleado.GUI; | |
using N1_Empleado.Modelo; | |
using N1_Empleado; | |
namespace N1_Empleado.GUI | |
{ | |
/// <summary> | |
/// Derivado de UserControl para la representación de los controles visuales | |
/// del salario del empleado. | |
/// </summary> | |
public partial class ControlSalario : UserControl | |
{ | |
#region Campos | |
/// <summary> | |
/// Representa una referencia a la interfaz principal. | |
/// </summary> | |
private Principal guiPrincipal; | |
#endregion | |
#region Constructores | |
/// <summary> | |
/// Inicializa una instancia de `UsrCtrlSalario` junto con una referencia | |
/// a la interfaz principal. | |
/// </summary> | |
/// <param name="principal"></param> | |
public ControlSalario(Principal principal) | |
{ | |
guiPrincipal = principal; | |
InitializeComponent(); | |
} | |
#endregion | |
#region Métodos auxiliares | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="salario"></param> | |
public void ActualizarSalario(decimal salario) | |
{ | |
txtSalario.Text = salario.ToString("$###,###.##"); | |
} | |
#endregion | |
#region Eventos | |
/// <summary> | |
/// Modifica el salario del empleado. | |
/// </summary> | |
/// <param name="sender">Activador del evento.</param> | |
/// <param name="e">Datos del evento.</param> | |
private void btnModificar_Click(object sender, EventArgs e) | |
{ | |
guiPrincipal.ModificarSalario(); | |
} | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment