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