예제 #1
0
        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;
            }
        }
예제 #2
0
 /// <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;
     }
 }
예제 #3
0
 /// <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;
     }
 }
예제 #4
0
        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);
        }
예제 #5
0
 /// <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;
     }
 }
예제 #6
0
        /// <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;
        }
예제 #7
0
 public List <REGION> FiltrarRegion(string valor)
 {
     try
     {
         RegionDAL regionDAL = new RegionDAL();
         return(regionDAL.FiltrarRegion(valor));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #8
0
 public REGION CargarRegion(int id)
 {
     try
     {
         RegionDAL regionDAL = new RegionDAL();
         return(regionDAL.CargarRegion(id));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #9
0
 public List <REGION> ListarTodasRegiones()
 {
     try
     {
         RegionDAL regionDAL = new RegionDAL();
         return(regionDAL.ListarTodasRegiones());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #10
0
 public List <REGION> ListarRegiones(int pais)
 {
     try
     {
         RegionDAL regionDAL = new RegionDAL();
         return(regionDAL.ListarRegiones(pais));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #11
0
 /// <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;
     }
 }
예제 #12
0
        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;
            }
        }
예제 #13
0
 /// <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));
 }
예제 #14
0
 /// <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));
 }
예제 #15
0
 /// <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());
 }
예제 #16
0
 public JsonResult GetRegion(int provinceId)
 {
     return Json(RegionDAL.GetDataByProvinceId(provinceId),
         JsonRequestBehavior.AllowGet);
 }
예제 #17
0
        public static bool ActivaRegion(RegionDTO theRegionDTO)
        {
            bool respuesta = RegionDAL.ActivaRegion(theRegionDTO);

            return(respuesta);
        }
예제 #18
0
 public RegionBLL()
 {
     _dal = new RegionDAL();
 }
예제 #19
0
 public static List <RegionBLL> ListRegions()
 {
     return(RegionDAL.ListRegions().Tables[0].AsEnumerable().Select(r => (RegionBLL)r).ToList());
 }
예제 #20
0
        public static bool Update(DTO.RegionDTO myRegionDTO)
        {
            bool resultado = RegionDAL.Update(myRegionDTO);

            return(resultado);
        }
예제 #21
0
 public static int Create(string RegionCode, string RegionName)
 {
     return(RegionDAL.Create(RegionCode, RegionName));
 }
예제 #22
0
        public static bool Insert(DTO.RegionDTO myRegionDTO)
        {
            bool resultado = RegionDAL.Insert(myRegionDTO);

            return(resultado);
        }
예제 #23
0
        public List <RegionDTO> GetActiveRegions()
        {
            RegionDAL dal = new RegionDAL();

            return(dal.GetActiveRegions());
        }