This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Data
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
|
||||
@@ -3442,6 +3443,42 @@ Public Class ClsCGame
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function REPInventarioDiarioPallets(fechaCalculo As DateTime, cveEmpresa As Int32, errorMostrarADS As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_REPInventarioDiarioPallets", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@FechaCalculo", SqlDbType.Date).Value = fechaCalculo
|
||||
.Add("@ErrorMostrarADS", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(DTSet)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de inventario diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function REPInventarioDiarioBins(fechaCalculo As DateTime, cveEmpresa As Int32, errorMostrarADS As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_CGame_REPInventarioDiarioBins", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@FechaCalculo", SqlDbType.Date).Value = fechaCalculo
|
||||
.Add("@ErrorMostrarADS", SqlDbType.VarChar).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(DTSet)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de inventario diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -17,28 +17,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
|
||||
public bool Ismodal { get { return ViewState["Ismodal"] != null ? (bool)ViewState["Ismodal"] : true; } set { ViewState["Ismodal"] = value; } }
|
||||
public string OnAddedTareaNueva { get { return ViewState["OnAddedTareaNueva"] != null ? ViewState["OnAddedTareaNueva"].ToString() : "OnAddedTareaNueva"; } set { ViewState["OnAddedTareaNueva"] = value; } }
|
||||
public const string iddivAgregarTema = "divModalAgregartema";
|
||||
|
||||
protected System.Data.DataTable get_GlobalDTUsuarios(int CveUsuario = -1, int CveEmpresa = -1)
|
||||
{
|
||||
System.Text.StringBuilder Str = new System.Text.StringBuilder();
|
||||
if (CveUsuario != -1) { Str.AppendFormat("CveUsuario = {0}", CveUsuario); }
|
||||
//if (CveEmpresa != -1) { Str.AppendFormat(" {0} CveEmpresa = {1}", Str.Length > 0 ? "AND" : "", CveEmpresa); }
|
||||
System.Data.DataTable dt = null;
|
||||
if (CveEmpresa != -1)
|
||||
{
|
||||
|
||||
String AppNombre = $"GlobalDTUsuarios-{CveEmpresa}";
|
||||
if (CveUsuario != -1 )
|
||||
{
|
||||
System.Data.DataView Dv = new System.Data.DataView((System.Data.DataTable)Application[AppNombre], Str.ToString(), "", System.Data.DataViewRowState.CurrentRows);
|
||||
dt = Dv.ToTable();
|
||||
Dv.Dispose();
|
||||
}
|
||||
else
|
||||
{ dt = (System.Data.DataTable)Application[AppNombre]; }
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -63,7 +42,7 @@ public partial class UserControl_TareaNueva : System.Web.UI.UserControl
|
||||
txtCveEventoPadre.Text = "-1";
|
||||
}
|
||||
string[] FiltroAD = { "CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol", "CveSubProyecto" };
|
||||
GVUsuarios_TareaNueva.DataSource = get_GlobalDTUsuarios(-1,UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Nombre ASC", FiltroAD);
|
||||
GVUsuarios_TareaNueva.DataSource = ClsPaginas.get_GlobalDTUsuarios(-1,UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Nombre ASC", FiltroAD);
|
||||
|
||||
DdlPara.DataSource = GVUsuarios_TareaNueva.DataSource;
|
||||
DdlPara.DataBind();
|
||||
|
||||
Reference in New Issue
Block a user