From 30441d28808b6855c2fd14b79a9eda62d5f78294 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 19 Feb 2024 10:31:41 -0700 Subject: [PATCH] --Correcion de carga de proveedores --- CGame/CatHuerta.aspx | 4 ++-- CGame/CatHuerta.aspx.cs | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CGame/CatHuerta.aspx b/CGame/CatHuerta.aspx index 94527050c..a539317dd 100644 --- a/CGame/CatHuerta.aspx +++ b/CGame/CatHuerta.aspx @@ -163,8 +163,8 @@
- - + +
diff --git a/CGame/CatHuerta.aspx.cs b/CGame/CatHuerta.aspx.cs index b5fc61ddb..aa7452887 100644 --- a/CGame/CatHuerta.aspx.cs +++ b/CGame/CatHuerta.aspx.cs @@ -1,4 +1,4 @@ - using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI.WebControls; using Extensiones; public partial class CATHuerta :ClsPaginas { #region Propiedades private int CveHuerta { get{return (ViewState["CveHuerta"] == null) ? 0 : Convert.ToInt32(ViewState["CveHuerta"]);} set{ViewState["CveHuerta"] =value;} } #endregion protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack){ CargaProveedor(); CargaHuerta(); } } protected void CargaHuerta() { ClsCGame ObjHuer =new ClsCGame(); if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa)) + using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI.WebControls; using Extensiones; public partial class CATHuerta :ClsPaginas { #region Propiedades private int CveHuerta { get{return (ViewState["CveHuerta"] == null) ? 0 : Convert.ToInt32(ViewState["CveHuerta"]);} set{ViewState["CveHuerta"] =value;} } #endregion protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack){ CargaProveedor(); CargaProveedores(); CargaHuerta(); } } protected void CargaHuerta() { ClsCGame ObjHuer =new ClsCGame(); if (ObjHuer.GetHuerta(UsuarioActual.CveEmpresa)) { GVHuerta.DataSource = ObjHuer.DtResultados; GVHuerta.DataBind(); @@ -78,4 +78,26 @@ } } } + + private void CargaProveedores() + { + if (UsuarioActual.Empresa.Funcionalidad(105) == "1") + { + DdlProveedor.setEsWebService(true); + DdlProveedor.Attributes.Add("data-metodo", "getproveedores"); + DdlProveedor.SelectedText = "Seleccione"; + DdlProveedor.SelectedValue = "-1"; + DdlProveedor.ddl.AutoPostBack = true; + } + else + { + DdlProveedor.DataSource = ClsPaginas.get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); + DdlProveedor.DataBind(); + DdlProveedor.ddl.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlProveedor.ddl.AutoPostBack = true; + } + + UPModalHuer.Update(); + } + } \ No newline at end of file