186 lines
5.8 KiB
C#
186 lines
5.8 KiB
C#
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 Exferia_Aplicacion.Visualizacion;
|
|
using Exferia_Aplicacion.General;
|
|
using Exferia_Formularios;
|
|
using Exferia_Aplicacion.ListadosSeleccion_Generales;
|
|
|
|
namespace Exferia_Controles
|
|
{
|
|
public partial class Exferia_Cuentas : UserControl
|
|
{
|
|
#region Propiedades Publicas
|
|
public bool Exferia_Cuentas_Fija
|
|
{
|
|
set
|
|
{
|
|
ex_chk_Fija.Checked = value;
|
|
}
|
|
get
|
|
{
|
|
return ex_chk_Fija.Checked;
|
|
}
|
|
}
|
|
|
|
public Exferia_F3 Exferia_Cuentas_Exferia_F3
|
|
{
|
|
get
|
|
{
|
|
return ex_usc_F3_Mayor;
|
|
}
|
|
}
|
|
|
|
public string Exferia_Cuentas_CuentaVariable
|
|
{
|
|
set
|
|
{
|
|
ex_txt_Cuenta_Variable.Text = value;
|
|
}
|
|
get
|
|
{
|
|
return ex_txt_Cuenta_Variable.Text;
|
|
}
|
|
}
|
|
|
|
public string Exferia_Cuentas_Descripcion
|
|
{
|
|
get
|
|
{
|
|
return ex_lbl_Descripcion.Text;
|
|
}
|
|
set
|
|
{
|
|
ex_lbl_Descripcion.Text=value;
|
|
|
|
ex_usc_F3_Mayor.Exferia_F3_Titulo = value;
|
|
|
|
}
|
|
}
|
|
|
|
internal bool g_bol_Obligatorio = false;
|
|
public bool Exferia_Cuentas_Obligatorio
|
|
{
|
|
set
|
|
{
|
|
g_bol_Obligatorio = value;
|
|
if (g_bol_Obligatorio)
|
|
{
|
|
ex_txt_Cuenta_Variable.Exferia_TextBox_Fondo = Colores.G_COLOR_FONDO_OBLIGATORIO;
|
|
}
|
|
else
|
|
{
|
|
ex_txt_Cuenta_Variable.Exferia_TextBox_Fondo = Color.White;
|
|
}
|
|
|
|
ex_usc_F3_Mayor.Exferia_F3_PRINCIPAL_Obligatorio = g_bol_Obligatorio;
|
|
}
|
|
get
|
|
{
|
|
return g_bol_Obligatorio;
|
|
}
|
|
}
|
|
|
|
internal P_Base g_P_Base_Contenedor = null;
|
|
public P_Base Exferia_Cuentas_PantallaContenedora
|
|
{
|
|
set
|
|
{
|
|
g_P_Base_Contenedor = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public Exferia_Cuentas()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
#endregion
|
|
|
|
public void Vaciar()
|
|
{
|
|
//F3
|
|
ex_usc_F3_Mayor.Exferia_F3_Id = -1;
|
|
ex_usc_F3_Mayor.Exferia_F3_Codigo = "";
|
|
ex_usc_F3_Mayor.Exferia_F3_Descripcion = "";
|
|
ex_usc_F3_Mayor.Exferia_F3_FechaBorrado = null;
|
|
|
|
//TextBox
|
|
ex_txt_Cuenta_Variable.Text = "";
|
|
|
|
ex_chk_Fija.Checked = false;
|
|
}
|
|
|
|
|
|
public INTERNO_ValorDevuelto_Modelo Validar()
|
|
{
|
|
INTERNO_ValorDevuelto_Modelo mdl_ValorDevuelto_Modelo = new INTERNO_ValorDevuelto_Modelo();
|
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = true;
|
|
|
|
// Si hay mayor validar que es Correcta
|
|
if (ex_chk_Fija.Checked)
|
|
{
|
|
if ((ex_usc_F3_Mayor.Exferia_F3_Codigo.Trim().Length != 0 ||
|
|
ex_usc_F3_Mayor.Exferia_F3_Descripcion.Trim().Length != 0) && ex_usc_F3_Mayor.Exferia_F3_Id == -1)
|
|
{
|
|
mdl_ValorDevuelto_Modelo.TodoCorrecto = false;
|
|
mdl_ValorDevuelto_Modelo.Mensaje = Mensajes.G_STR_GENERAL_VALIDACIONES_F3_INCORRECTO(ex_usc_F3_Mayor.Exferia_F3_Titulo);
|
|
mdl_ValorDevuelto_Modelo.Objeto = ex_usc_F3_Mayor.Exferia_F3_PRINCIPAL_TextBox_Codigo;
|
|
}
|
|
}
|
|
|
|
return mdl_ValorDevuelto_Modelo;
|
|
}
|
|
|
|
private void ex_chk_Fija_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (ex_chk_Fija.Checked)
|
|
{
|
|
pnl_P_Concepto_CuentaContable.Visible = false;
|
|
ex_usc_F3_Mayor.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
ex_usc_F3_Mayor.Visible = false;
|
|
pnl_P_Concepto_CuentaContable.Visible = true;
|
|
}
|
|
|
|
}
|
|
|
|
private void ex_btn_AddVariables_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
//Obtener el Listado .........................
|
|
ABS_ListadoSeleccion_Variables mdl_ABS_ListadoSeleccion_Variables = new ABS_ListadoSeleccion_Variables();
|
|
|
|
//Listado de Variables ...........................................................
|
|
List<INTERNO_CodigoDescripcion_Modelo> lst_INTERNO_CodigoDescripcion_Modelo = new List<INTERNO_CodigoDescripcion_Modelo>();
|
|
lst_INTERNO_CodigoDescripcion_Modelo.Add(Variables.G_MDL_PARAMETRO_EXFERIA_CUENTAS_MES_DOSDIGITOS);
|
|
lst_INTERNO_CodigoDescripcion_Modelo.Add(Variables.G_MDL_PARAMETRO_EXFERIA_CUENTAS_PROVEEDOR_CODIGO);
|
|
//................................................................................
|
|
|
|
mdl_ABS_ListadoSeleccion_Variables.Registros = lst_INTERNO_CodigoDescripcion_Modelo.Cast<dynamic>().ToList();
|
|
|
|
//Llamar al formualario de ListadoSeleccion
|
|
PE_Listados_SoloSeleccion frm_PE_Listados_SoloSeleccion = new PE_Listados_SoloSeleccion(mdl_ABS_ListadoSeleccion_Variables, g_P_Base_Contenedor.P_Base_ValoresGenerales, g_P_Base_Contenedor.P_Base_FechaTrabajo);
|
|
frm_PE_Listados_SoloSeleccion.ShowDialog();
|
|
|
|
//Si se selecciono algo lo cargo en le combo correspondiente
|
|
if (frm_PE_Listados_SoloSeleccion.g_dnm_RegistroSeleccionado != null)
|
|
{
|
|
string str_Codigo = frm_PE_Listados_SoloSeleccion.g_dnm_RegistroSeleccionado.Codigo;
|
|
|
|
ex_txt_Cuenta_Variable.Text += str_Codigo;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|