コード例 #1
0
ファイル: DSector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        /// permite Consultar los sectores de puntos de venta
        /// 15/09/2010 Magaly Jiménez
        ///modificación: se agrega parametro iCompany_id
        /// 11/11/2010 Magaly Jiménez
        /// </summary>
        /// <param name="sSector"></param>
        /// <param name="iid_malla"></param>
        /// <returns>dt</returns>
        public DataTable ObtenerSector(int iid_malla, string sSector, int iCompany_id)
        {
            DataTable dt       = oConn.ejecutarDataTable("UP_WEBXPLORA_AD_CONSULTASECTORES", iid_malla, sSector, iCompany_id);
            ESector   oeSector = new ESector();
            EMalla    oeMallas = new EMalla();

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i <= dt.Rows.Count - 1; i++)
                    {
                        oeSector.id_sector     = Convert.ToInt32(dt.Rows[i]["id_sector"].ToString().Trim());
                        oeMallas.Company_id    = Convert.ToInt32(dt.Rows[i]["Company_id"].ToString().Trim());
                        oeSector.id_malla      = Convert.ToInt32(dt.Rows[i]["id_malla"].ToString().Trim());
                        oeSector.Sector        = dt.Rows[i]["Sector"].ToString().Trim();
                        oeSector.Sector_Status = Convert.ToBoolean(dt.Rows[i]["Sector_Status"].ToString().Trim());
                        //oeSector.Sector_CreateBy = dt.Rows[i]["Sector_CreateBy"].ToString().Trim();
                        //oeSector.Sector_DateBy = Convert.ToDateTime(dt.Rows[i]["Sector_DateBy"].ToString().Trim());
                        //oeSector.Sector_ModiBy = dt.Rows[i]["Sector_ModiBy"].ToString().Trim();
                        //oeSector.Sector_DateModiBy = Convert.ToDateTime(dt.Rows[i]["Sector_DateModiBy"].ToString().Trim());
                    }
                }
                return(dt);
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        public ESector CreateESector(Sector sector)
        {
            ESector eSector = new ESector()
            {
                SkyMaterial     = sector.skyMaterial,
                SectorBorder    = sector.sectorBorder,
                LightReferences = sector.staticLights.Select(l => l.Offset.ToString()).ToList(),
                Neighbours      = sector.neighbors.Select(n => n.sector.offset.ToString()).ToList()
            };

            eSector.Geometry = new Dictionary <string, EGeometry>();
            foreach (SuperObject spo in sector.SuperObject.children)
            {
                IPO ipo = spo.data as IPO;
                if (ipo != null)   // If IPO

                {
                    EGeometry eg = new EGeometry();

                    PhysicalObject po = ipo.data;
                    if (po.visualSet.Length > 0)
                    {
                        eg.Visuals   = po.visualSet[0].obj as GeometricObject;
                        eg.Collision = po.collideMesh;
                    }

                    eSector.Geometry.Add(ipo.offset.ToString(), eg);
                }
            }

            return(eSector);
        }
コード例 #3
0
ファイル: Sector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        /// permite registrar sectores de Puntos de venta
        /// 15/09/2010 Magaly Jiménez
        /// </summary>
        /// <param name="sSector"></param>
        /// <param name="iid_malla"></param>
        /// <param name="bSector_Status"></param>
        /// <param name="sSector_CreateBy"></param>
        /// <param name="tSector_DateBy"></param>
        /// <param name="sSector_ModiBy"></param>
        /// <param name="tSector_DateModiBy"></param>
        /// <returns>oeSector</returns>
        public ESector RegistrarSector(string sSector, int iid_malla, bool bSector_Status,
                                       string sSector_CreateBy, DateTime tSector_DateBy, string sSector_ModiBy, DateTime tSector_DateModiBy)
        {
            DSector odrSector = new DSector();
            ESector oeSector  = odrSector.RegistrarSector(sSector, iid_malla, bSector_Status, sSector_CreateBy, tSector_DateBy, sSector_ModiBy, tSector_DateModiBy);

            odrSector = null;
            return(oeSector);
        }
コード例 #4
0
ファイル: Sector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        /// Permite Actualizar Sectores de Puntos de Venta
        ///  15/09/2010 Magaly Jiménez
        /// </summary>
        /// <param name="iid_sector"></param>
        /// <param name="iid_malla"></param>
        /// <param name="sSector"></param>
        /// <param name="bSector_Status"></param>
        /// <param name="sSector_ModiBy"></param>
        /// <param name="tSector_DateModiBy"></param>
        /// <returns> oeaSector</returns>
        public ESector Actualizar_Sector(int iid_sector, int iid_malla, string sSector, bool bSector_Status,
                                         string sSector_ModiBy, DateTime tSector_DateModiBy)
        {
            DSector odaSector = new DSector();
            ESector oeaSector = odaSector.Actualizar_Sector(iid_sector, iid_malla, sSector, bSector_Status,
                                                            sSector_ModiBy, tSector_DateModiBy);

            odaSector = null;
            return(oeaSector);
        }
コード例 #5
0
ファイル: Sector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        /// permite Consultar sectores de Puntos de venta
        /// 15/09/2010 Magaly Jiménez
        /// </summary>
        /// <param name="sSector"></param>
        /// <param name="iid_malla"></param>
        /// <returns>dtSector</returns>
        public DataTable ConsultarSector(int iid_malla, string sSector, int icompanyid)
        {
            DSector odsSector = new DSector();
            ESector oeSector  = new ESector();

            DataTable dtSector = odsSector.ObtenerSector(iid_malla, sSector, icompanyid);

            odsSector = null;
            return(dtSector);
        }
コード例 #6
0
ファイル: DSector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        ///  permite registrar sectores de Puntos de venta
        /// 15/09/2010 Magaly Jiménez
        /// </summary>
        /// <param name="sSector"></param>
        /// <param name="iid_malla"></param>
        /// <param name="bSector_Status"></param>
        /// <param name="sSector_CreateBy"></param>
        /// <param name="tSector_DateBy"></param>
        /// <param name="sSector_ModiBy"></param>
        /// <param name="tSector_DateModiBy"></param>
        /// <returns>oerSector</returns>
        public ESector RegistrarSector(string sSector, int iid_malla, bool bSector_Status,
                                       string sSector_CreateBy, DateTime tSector_DateBy, string sSector_ModiBy, DateTime tSector_DateModiBy)
        {
            DataTable dt = oConn.ejecutarDataTable("UP_WEBXPLORA_AD_REGISTERSECTOR", sSector, iid_malla, bSector_Status,
                                                   sSector_CreateBy, tSector_DateBy, sSector_ModiBy, tSector_DateModiBy);
            ESector oerSector = new ESector();

            oerSector.Sector            = sSector;
            oerSector.id_malla          = iid_malla;
            oerSector.Sector_Status     = bSector_Status;
            oerSector.Sector_CreateBy   = sSector_CreateBy;
            oerSector.Sector_DateBy     = tSector_DateBy;
            oerSector.Sector_ModiBy     = sSector_ModiBy;
            oerSector.Sector_DateModiBy = tSector_DateModiBy;
            return(oerSector);
        }
コード例 #7
0
ファイル: DSector.cs プロジェクト: Neonemesis15/FrameworkNet
        /// <summary>
        /// Permite Actualizar Sector de Puntos de Venta
        /// 15/09/2010 Magaly Jiménez
        /// </summary>
        /// <param name="iid_sector"></param>
        /// <param name="iid_malla"></param>
        /// <param name="sSector"></param>
        /// <param name="bSector_Status"></param>
        /// <param name="sSector_ModiBy"></param>
        /// <param name="tSector_DateModiBy"></param>
        /// <returns>oeaSector</returns>
        public ESector Actualizar_Sector(int iid_sector, int iid_malla, string sSector, bool bSector_Status,
                                         string sSector_ModiBy, DateTime tSector_DateModiBy)
        {
            DataTable dt = oConn.ejecutarDataTable("UP_WEBXPLORA_AD_ACTUALIZAR_SECTOR", iid_sector, iid_malla, sSector, bSector_Status,
                                                   sSector_ModiBy, tSector_DateModiBy);
            ESector oeaSector = new ESector();

            oeaSector.id_sector         = iid_sector;
            oeaSector.id_malla          = iid_malla;
            oeaSector.Sector            = sSector;
            oeaSector.Sector_Status     = bSector_Status;
            oeaSector.Sector_ModiBy     = sSector_ModiBy;
            oeaSector.Sector_DateModiBy = tSector_DateModiBy;

            return(oeaSector);
        }
コード例 #8
0
        /// <summary>
        /// Obtener puntos de venta asignados a un operativo
        /// Ing. Mauricio Ortiz
        /// 27/10/2010
        /// </summary>
        /// DataTable[0] Retornar listado de Puntos de Venta asignados a un Mercaderista por idPlanning
        /// - No            .- Número de Orden del Punto de Venta
        /// - Código        .- Identificador del Punto de Venta Asignado al Mercaderista.
        /// - Nombre        .- Nombre del Punto de Venta Asignado al Mercadersita.
        /// - Región        .- Nombre de la Región del Punto de Venta Asignado al Mercaderista.
        /// - Zona          .- Nombre de la Zona del Punto de Venta asignado al Mercaderista.
        /// - Fecha inicio  .- Fecha de Inicio para recolectar información del Punto de Venta asignado al Mercaderista.
        /// - Fecha fin     .- Fecha de Fin para recolectar información del Punto de Venta asignado al Mercaderista.
        /// <param name="sid_planning"></param>
        /// <param name="iidperson"></param>
        /// <returns></returns>
        public DataTable ObtenerPuntosVentaXoperativo(
            string sid_planning, int iidperson)
        {
            DataTable dt =
                oConn.ejecutarDataTable(
                    "UP_WEBXPLORA_PLA_OBTENERPDVXOPERATIVO",
                    sid_planning, iidperson);

            EPointOfSale_PlanningOper oeEPointOfSale_PlanningOper =
                new EPointOfSale_PlanningOper();
            EPuntosDV oeEPuntosDV = new EPuntosDV();
            EMalla    oeEMalla    = new EMalla();
            ESector   oeESector   = new ESector();

            //if (dt != null)
            //{
            //if (dt.Rows.Count > 0)
            //{
            for (int i = 0; i <= dt.Rows.Count - 1; i++)
            {
                oeEPointOfSale_PlanningOper.id_POSPlanningOpe = Convert.ToInt32(dt.Rows[i]["No"].ToString().Trim());
                oeEPuntosDV.ClientPDV_Code = dt.Rows[i]["Código"].ToString().Trim();
                oeEPuntosDV.pdvName        = dt.Rows[i]["Nombre"].ToString().Trim();
                oeEMalla.malla             = dt.Rows[i]["Región"].ToString().Trim();
                oeESector.Sector           = dt.Rows[i]["Zona"].ToString().Trim();
                oeEPointOfSale_PlanningOper.POSPlanningOpe_Fechainicio = Convert.ToDateTime(dt.Rows[i]["Fecha inicio"].ToString().Trim());
                oeEPointOfSale_PlanningOper.POSPlanningOpe_Fechafin    = Convert.ToDateTime(dt.Rows[i]["Fecha fin"].ToString().Trim());
            }
            //}
            return(dt);
            //}
            //else
            //{
            //    return null;
            //}
        }