58 lines
1.8 KiB
C#
58 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Extensiones;
|
|
public partial class OI_UnoaUno : ClsPaginas
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
TxtCFecha.Text = DateTime.Now.ToString("dd/MM/yyyy");
|
|
LtlusuarioTitulo.Text = UsuarioActual.Nombre;
|
|
BtnConsultar_Click(null, null);
|
|
}
|
|
}
|
|
|
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
|
{
|
|
using (ClsOIEventos ObjPA_O = new ClsOIEventos())
|
|
{
|
|
|
|
ObjPA_O.UnoAUnoTableroGet(UsuarioActual.CveEmpresa, TxtCFecha.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario);
|
|
GVPA_OI_UnoAUnoTableroGet.DataSource = ObjPA_O.DtResultados;
|
|
ObjPA_O.Dispose();
|
|
GVPA_OI_UnoAUnoTableroGet.DataBind();
|
|
}
|
|
}
|
|
|
|
protected void LnkGuardar_Click(object sender, EventArgs e)
|
|
{
|
|
string fecha = TxtCFecha.Text.ToDate().ToString("yyyy/MM/dd");
|
|
bool continuar = true;
|
|
using (ClsOIEventos ObjPA_O = new ClsOIEventos())
|
|
{
|
|
foreach (GridViewRow gvrow in GVPA_OI_UnoAUnoTableroGet.Rows)
|
|
{
|
|
if (continuar)
|
|
{
|
|
int CveUnoaUnoEtiqueta = gvrow.DataKey("CveUnoaUnoEtiqueta").ToEntero();
|
|
if (CveUnoaUnoEtiqueta > 0)
|
|
{
|
|
string Comentarios = gvrow.FCTextBox("TxtComentarios").Text;
|
|
continuar = ObjPA_O.UnoAUnoTableroAdd(UsuarioActual.CveEmpresa, fecha, UsuarioActual.CveUsuario, CveUnoaUnoEtiqueta, Comentarios);
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
if (continuar)
|
|
{
|
|
Alert("Información Actualizada");
|
|
}
|
|
}
|
|
} |