Cambios TareaDetalle y Clientes
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -605,7 +605,7 @@
|
||||
<asp:TextBox ID="TxtUsuario" runat="server" CssClass="form-control input-sm TxtUsuario" Style="display: inline-block; margin-right: -20px; width: 150px;" CausesValidation="true"></asp:TextBox>
|
||||
<a href="javascript:;" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVUsuarios" runat="server" AutoGenerateColumns="false" DataKeyNames="CveUsuario,Nombre,Correo,Empresa,CveRol,CveSubProyecto"
|
||||
<asp:GridView ID="GVUsuarios" runat="server" AutoGenerateColumns="false" DataKeyNames="CveUsuario,Nombre,Correo,Empresa,CveRol"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GVUsuarios" GridLines="None" data-height="200"
|
||||
OnRowDataBound="GVUsuarios_RowDataBound">
|
||||
<Columns>
|
||||
|
||||
@@ -263,7 +263,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
}
|
||||
private void cargaUsuarios()
|
||||
{
|
||||
string FiltroAD = "";
|
||||
string[] FiltroAD = { "CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol" , "Correo", "Empresa", "CveRol"};
|
||||
|
||||
|
||||
DdlRoles.DataSource = get_GlobalDTRoles(UsuarioActual.CveEmpresa);
|
||||
@@ -278,8 +278,10 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
GVUsuarios.DataBind();
|
||||
UpUsuarios.Update();
|
||||
|
||||
|
||||
|
||||
GVUsuarios.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1 {1}", UsuarioActual.CveEmpresa, FiltroAD), "Rol ASC");
|
||||
|
||||
GVUsuarios.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Rol ASC", FiltroAD);
|
||||
GVUsuariosB.DataSource = GVUsuarios.DataSource;
|
||||
GVUsuarios.DataBind();
|
||||
GVUsuariosB.DataBind();
|
||||
@@ -290,7 +292,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
string CveRol = e.Row.DBCampo("CveRol");
|
||||
string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
|
||||
//string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
|
||||
e.Row.CssClass = "items";
|
||||
//e.Row.Attributes.Add("data-rol", CveRol);
|
||||
//e.Row.Attributes.Add("data-sucursal", CveRol);
|
||||
@@ -302,7 +304,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
string CveRol = e.Row.DBCampo("CveRol");
|
||||
string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
|
||||
//string CveSubProyecto = e.Row.DBCampo("CveSubProyecto");
|
||||
e.Row.CssClass = "items";
|
||||
e.Row.Attributes.Add("data-rol", CveRol);
|
||||
e.Row.Attributes.Add("data-sucursal", CveRol);
|
||||
@@ -465,7 +467,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
int CveOS = drow["CveOS"].ToString().ToEntero();
|
||||
int CveOC = drow["CveOC"].ToString().ToEntero();
|
||||
int CveContrato = drow["CveContrato"].ToString().ToEntero();
|
||||
int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero();
|
||||
//int CveSubProyecto = drow["CveSubProyecto"].ToString().ToEntero();
|
||||
int CveMovimientoAlmacen = drow["CveMovimientoAlmacen"].ToString().ToEntero();
|
||||
|
||||
//int = drow[""].ToString().ToEntero();
|
||||
@@ -532,11 +534,11 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
titulo = "Contrato";
|
||||
link = string.Format("<a href=\"/Contratos/Contrato.aspx?CveContrato={1}\" class=\"linkCorreo\">{0} </a>", drow["Contrato"], CveContrato);
|
||||
}
|
||||
else if (CveSubProyecto > 0)
|
||||
{
|
||||
titulo = "Sub Proyecto";
|
||||
link = string.Format("<a href=\"/?={1}\" class=\"linkCorreo\">{0} </a>", drow["SubProyecto"], CveSubProyecto);
|
||||
}
|
||||
//else if (CveSubProyecto > 0)
|
||||
//{
|
||||
// titulo = "Sub Proyecto";
|
||||
// link = string.Format("<a href=\"/?={1}\" class=\"linkCorreo\">{0} </a>", drow["SubProyecto"], CveSubProyecto);
|
||||
//}
|
||||
else if (CveMovimientoAlmacen > 0)
|
||||
{
|
||||
titulo = "Almacen";
|
||||
|
||||
@@ -1405,6 +1405,7 @@ Partial Class Clientes
|
||||
Dim RetSC As Boolean = CargaSucursalesCliente()
|
||||
Dim RetCC As Boolean = CargaCotizaciones()
|
||||
CargaHistorial()
|
||||
CargaResumenHistorial()
|
||||
Dim RetCxC As Boolean = CargaCxC()
|
||||
CargaAnticipos()
|
||||
CargaPersonalAsignado()
|
||||
@@ -1799,14 +1800,9 @@ Partial Class Clientes
|
||||
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
'Carga Generales
|
||||
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString().FormatoNumero()(0)
|
||||
LtlTotalVendido.Text = ObjClientes.DtResultados.Rows(0)("Total").ToString().FormatoNumero()(2)
|
||||
LtlMinima.Text = ObjClientes.DtResultados.Rows(0)("MIN_Total").ToString().FormatoNumero()(2)
|
||||
LtlPromedio.Text = ObjClientes.DtResultados.Rows(0)("AVG_Total").ToString().FormatoNumero()(2)
|
||||
LtlMaxima.Text = ObjClientes.DtResultados.Rows(0)("MAX_Total").ToString().FormatoNumero()(2)
|
||||
'Carga Grid
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
'Carga Grid
|
||||
DTHistorialVentas = ObjClientes.DtResultados
|
||||
GVHistorial.DataSource = ObjClientes.DtResultados
|
||||
Else
|
||||
@@ -10313,5 +10309,44 @@ Partial Class Clientes
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaResumenHistorial()
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, -1, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim Cantidad As Double
|
||||
Dim Max As Double
|
||||
Dim Min As Double = 1000000000000
|
||||
Dim Total As Double
|
||||
Dim Promedio As Double
|
||||
|
||||
For Each row As DataRow In ObjClientes.DtResultados.Rows
|
||||
If row.Item("Folio").ToString <> "" Then
|
||||
If row.Item("Total").ToString.ToDouble > Max Then
|
||||
Max = row.Item("Total").ToString.ToDouble
|
||||
End If
|
||||
If row.Item("Total").ToString.ToDouble < Min And row.Item("Total").ToString.ToDouble > 0 Then
|
||||
Min = row.Item("Total").ToString.ToDouble
|
||||
End If
|
||||
|
||||
|
||||
Total += row.Item("Total").ToString.ToDouble
|
||||
Cantidad += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
Promedio = Total / Cantidad
|
||||
|
||||
'Carga Generales
|
||||
LtlCantidad.Text = Cantidad.ToString.FormatoNumero(0)
|
||||
LtlTotalVendido.Text = Total.ToString.FormatoNumero()
|
||||
LtlMinima.Text = Min.ToString.FormatoNumero()
|
||||
LtlPromedio.Text = Promedio.ToString.FormatoNumero()
|
||||
LtlMaxima.Text = Max.ToString.FormatoNumero()
|
||||
End If
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user