public static string getAreasByFicepi(string origenMenu) { IB.SUPER.SIC.BLL.AreaPreventa cTP = new IB.SUPER.SIC.BLL.AreaPreventa(); bool actuocomoadministrador = false; if (origenMenu == "ADM") { actuocomoadministrador = true; } try { return(JsonConvert.SerializeObject(cTP.getAreasByFicepi(int.Parse(HttpContext.Current.Session["IDFICEPI_PC_ACTUAL"].ToString()), actuocomoadministrador))); } catch (Exception ex) { LogError.LogearError("Error al obtener los áreas", ex); throw new Exception("Error al obtener los áreas"); } finally { if (cTP != null) { cTP.Dispose(); } } }
public static string getAreaSel(int ta200_idareapreventa) { IB.SUPER.SIC.BLL.AreaPreventa cTP = new IB.SUPER.SIC.BLL.AreaPreventa(); try { return(JsonConvert.SerializeObject(cTP.Select(ta200_idareapreventa))); } catch (Exception ex) { LogError.LogearError("Error al obtener el detalle del área", ex); throw new Exception("Error al obtener el detalle del área"); } finally { if (cTP != null) { cTP.Dispose(); } } }