public string CrearRegion(string nombre, int pais) { try { REGION region = new REGION(); RegionDAL regionDAL = new RegionDAL(); if (nombre != "" & nombre.Trim().Length > 1) { region.NOMBRE = nombre.ToUpper(); region.FECHA_CREACION = DateTime.Now; region.PAIS_ID = pais; region.FECHA_ULTIMO_UPDATE = DateTime.Now; return(regionDAL.CrearRegion(region)); } else { return("El nombre debe tener al menos 2 caracteres"); } } catch (Exception ex) { throw ex; } }
/// <summary> /// Date Created: 27/02/2012 /// Created By: Gabriel Oquialda /// (description) Delete region seaport (flagged as inactive) /// </summary> public static void DeleteRegionSeaport(string RegionSeaportID, string DeletedBy) { try { RegionDAL.DeleteRegionSeaport(RegionSeaportID, DeletedBy); } catch (Exception ex) { throw ex; } }
/// <summary> /// Date Created: 28/02/2012 /// Created By: Gabriel Oquialda /// (description) Delete region (flagged as inactive) /// </summary> public static void DeleteRegion(Int32 RegionID, string DeletedBy) { try { RegionDAL.DeleteRegion(RegionID, DeletedBy); } catch (Exception ex) { throw ex; } }
public static RegionBLL GetDetails(int RegionID) { RegionBLL r = new RegionBLL(); DataTable dt = RegionDAL.GetDetails(RegionID).Tables[0]; if (dt.Rows.Count > 0) { r = (RegionBLL)dt.Rows[0]; } return(r); }
/// <summary> /// Date Created: 27/02/2012 /// Created By: Gabriel Oquialda /// (description) Get region seaport /// </summary> /// <param name="RegionID"></param> /// <returns></returns> public static List <RegionSeaport> GetRegionSeaport(string RegionID, string CountryID, string PortName) { try { return(RegionDAL.GetRegionSeaport(RegionID, CountryID, PortName)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Author: Charlene Remotigue /// Date Created: 09/05/2012 /// Description: Load Region Seaport page /// </summary> /// <param name="RegionId"></param> /// <returns></returns> public static void LoadRegionPage(int RegionId, string strLogDescription, string strFunction, string PathName, DateTime GMTDate, DateTime DateNow, string UserName) { List <RegionGenericClass> region = new List <RegionGenericClass>(); region = RegionDAL.LoadRegionPage(RegionId, strLogDescription, strFunction, PathName, GMTDate, DateNow, UserName); RegionClass.ContinentList = region[0].ContinentList; RegionClass.RegionSeaportList = region[0].RegionSeaportList; }
public List <REGION> FiltrarRegion(string valor) { try { RegionDAL regionDAL = new RegionDAL(); return(regionDAL.FiltrarRegion(valor)); } catch (Exception ex) { throw ex; } }
public REGION CargarRegion(int id) { try { RegionDAL regionDAL = new RegionDAL(); return(regionDAL.CargarRegion(id)); } catch (Exception ex) { throw ex; } }
public List <REGION> ListarTodasRegiones() { try { RegionDAL regionDAL = new RegionDAL(); return(regionDAL.ListarTodasRegiones()); } catch (Exception ex) { throw ex; } }
public List <REGION> ListarRegiones(int pais) { try { RegionDAL regionDAL = new RegionDAL(); return(regionDAL.ListarRegiones(pais)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Date Created: 27/02/2012 /// Created By: Gabriel Oquialda /// (description) Insert region seaport /// </summary> public static Int32 InsertRegionSeaport(string RegionSeaportID, string RegionID, string SeaportID, string CreatedBy) { try { Int32 pRegionSeaportID = 0; pRegionSeaportID = RegionDAL.InsertRegionSeaport(RegionSeaportID, RegionID, SeaportID, CreatedBy); return(pRegionSeaportID); } catch (Exception ex) { throw ex; } }
public string ActualizarRegion(string nombre, int id, int pais) { try { REGION region = new REGION(); RegionDAL regionDAL = new RegionDAL(); if (nombre.Trim().Length > 1) { if (id > 0) { if (pais > 0) { region.ID = id; region.FECHA_ULTIMO_UPDATE = DateTime.Now; region.PAIS_ID = pais; region.NOMBRE = nombre; return(regionDAL.ActualizarRegion(region)); } else { return("Seleccione un pais"); } } else { return("Seleccione un registro de la tabla"); } } else { return("El nombre debe tener al menos 2 caracteres"); } } catch (Exception ex) { throw ex; } }
/// <summary> /// Date Created: 04/05/2012 /// Created By: Josephine Gad /// (description) Get Seaport not exists in Region /// ------------------------------- /// </summary> /// <param name="RegionID"></param> /// <returns></returns> public static List <RegionSeaportNotExists> GetSeaportNotExistsInRegion(int RegionID, int ContinentID, int CountryID, string PortName) { return(RegionDAL.GetSeaportNotExistsInRegion(RegionID, ContinentID, CountryID, PortName)); }
/// <summary> /// Date Created: 27/02/2012 /// Modified By: Gabriel Oquialda /// (description) Get seaport list /// -------------------------------- /// </summary> public static List <Seaport> GetSeaport(int RegionID, bool IsViewExist) { return(RegionDAL.GetSeaport(RegionID, IsViewExist)); }
/// <summary> /// Date Created: 04/05/2012 /// Created By: Josephine Gad /// (description) Get Continent list /// ------------------------------- /// </summary> /// <param name="RegionID"></param> /// <returns></returns> public static List <Continent> GetContinent() { return(RegionDAL.GetContinent()); }
public JsonResult GetRegion(int provinceId) { return Json(RegionDAL.GetDataByProvinceId(provinceId), JsonRequestBehavior.AllowGet); }
public static bool ActivaRegion(RegionDTO theRegionDTO) { bool respuesta = RegionDAL.ActivaRegion(theRegionDTO); return(respuesta); }
public RegionBLL() { _dal = new RegionDAL(); }
public static List <RegionBLL> ListRegions() { return(RegionDAL.ListRegions().Tables[0].AsEnumerable().Select(r => (RegionBLL)r).ToList()); }
public static bool Update(DTO.RegionDTO myRegionDTO) { bool resultado = RegionDAL.Update(myRegionDTO); return(resultado); }
public static int Create(string RegionCode, string RegionName) { return(RegionDAL.Create(RegionCode, RegionName)); }
public static bool Insert(DTO.RegionDTO myRegionDTO) { bool resultado = RegionDAL.Insert(myRegionDTO); return(resultado); }
public List <RegionDTO> GetActiveRegions() { RegionDAL dal = new RegionDAL(); return(dal.GetActiveRegions()); }