Ejemplo n.º 1
0
        public static ClsModuleCollection GetNonAuthenticatedNonCollMod()
        {
            ClsModuleCollection obj = new ClsModuleCollection();

            if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap)
            {
                try
                {
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                    }
                }
                catch (System.ServiceModel.EndpointNotFoundException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetNonAuthenticatedNonCollMod", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                    }
                }
                catch (System.ServiceModel.CommunicationException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetNonAuthenticatedNonCollMod", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                    }
                }
            }
            else
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    try
                    {
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                        }
                    }
                    #region Catch
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "GetNonAuthenticatedNonCollMod", "clsModuleCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                        }
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "GetNonAuthenticatedNonCollMod", "clsModuleCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' and ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where NeedsAuthentication='false' and IsDeleted='false' and IsCollaborative='false' order by ModuleName").dsInfo);
                        }
                    }
                    #endregion
                }
                else
                {
                    obj.MapObjects(new ClsModuleDataService().GetNonAuthenticatedNonCollMod());
                }
            }
            return(obj);
        }
Ejemplo n.º 2
0
        public static ClsModuleCollection GetAll()
        {
            ClsModuleCollection obj = new ClsModuleCollection();

            if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap)
            {
                try
                {
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else ///show all modules present in Vmukti database
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                    }
                }

                #region Catch block
                catch (System.ServiceModel.EndpointNotFoundException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetAll()", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else ///show all modules present in Vmukti database
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                    }
                }
                catch (System.ServiceModel.CommunicationException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetAll()", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                    }
                    else ///show all modules present in Vmukti database
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                    }
                }
                #endregion
            }
            else
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    try
                    {
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                        }
                    }

                    #region Catch Block
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "GetAll()", "clsModuleCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                        }
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "GetAll()", "clsModuleCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")  ///Show Only collaborative modules who contains ModuleVersion=1.0.0.0
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module where ModuleVersion like '1.0.%' order by ModuleName").dsInfo);
                        }
                        else
                        {
                            obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select ModuleName,id,IsCollaborative,ZipFile,AssemblyFile,ImageFile from Module order by ModuleName").dsInfo);
                        }
                    }
                    #endregion
                }
                else
                {
                    obj.MapObjects(new ClsModuleDataService().GetModules());
                }
            }
            return(obj);
        }
Ejemplo n.º 3
0
        public static ClsModuleCollection GetCModCountCheck(int intRoleId, int intMCount)
        {
            ClsModuleCollection obj = new ClsModuleCollection();

            if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
            {
                List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                objInfo.Direction = "Input";
                objInfo.PName     = "@pRoleId";
                objInfo.PValue    = intRoleId;
                objInfo.PDBType   = "BigInt";
                objInfo.PSize     = 200;
                lstSP.Add(objInfo);

                clsSqlParametersInfo objInfoCount = new clsSqlParametersInfo();
                objInfoCount.Direction = "Input";
                objInfoCount.PName     = "@pCount";
                objInfoCount.PValue    = intMCount;
                objInfoCount.PDBType   = "BigInt";
                objInfoCount.PSize     = 200;
                lstSP.Add(objInfoCount);

                clsSqlParametersInfo objVersionInfo = new clsSqlParametersInfo();
                objVersionInfo.Direction = "Input";
                objVersionInfo.PName     = "@pVersion";
                if (VMuktiAPI.VMuktiInfo.VMuktiVersion == "1.0")
                {
                    objVersionInfo.PValue = "1.0.%";
                }
                else
                {
                    objVersionInfo.PValue = " ";
                }
                objVersionInfo.PDBType = "varchar";
                objVersionInfo.PSize   = 10;
                lstSP.Add(objVersionInfo);

                clsSqlParameterContract CSqlInfo = new clsSqlParameterContract();
                CSqlInfo.objParam = lstSP;

                try
                {
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModulesCount", CSqlInfo).dsInfo);
                }
                catch (System.ServiceModel.EndpointNotFoundException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetCModCountCheck(int intRoleId,int intMCount)", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModulesCount", CSqlInfo).dsInfo);
                }
                catch (System.ServiceModel.CommunicationException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "GetCModCountCheck(int intRoleId,int intMCount)", "clsModuleCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModulesCount", CSqlInfo).dsInfo);
                }
            }
            else
            {
                obj.MapObjects(new ClsModuleDataService().GetCollaborativeCheckingModuleCount(intRoleId, intMCount));
            }
            return(obj);
        }
Ejemplo n.º 4
0
        public static ClsModuleCollection SubCategory(int intRoleId)
        {
            ClsModuleCollection obj = new ClsModuleCollection();

            if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap)
            {
                List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                objInfo.Direction = "Input";
                objInfo.PName     = "@pRoleId";
                objInfo.PValue    = intRoleId;
                objInfo.PDBType   = "BigInt";
                objInfo.PSize     = 200;
                lstSP.Add(objInfo);

                clsSqlParameterContract CSqlInfo = new clsSqlParameterContract();
                CSqlInfo.objParam = lstSP;

                try
                {
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                }
                catch (System.ServiceModel.EndpointNotFoundException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "SubCategory(int intRoleId)", "clsCategoryCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                }
                catch (System.ServiceModel.CommunicationException e)
                {
                    VMuktiHelper.ExceptionHandler(e, "SubCategory(int intRoleId)", "clsCategoryCollection.cs");
                    VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                }
            }
            else
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName     = "@pRoleId";
                    objInfo.PValue    = intRoleId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;
                    lstSP.Add(objInfo);

                    clsSqlParameterContract CSqlInfo = new clsSqlParameterContract();
                    CSqlInfo.objParam = lstSP;

                    try
                    {
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "SubCategory(int intRoleId)", "clsCategoryCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "SubCategory(int intRoleId)", "clsCategoryCollection.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGCModules", CSqlInfo).dsInfo);
                    }
                }
                else
                {
                    obj.MapObjects(new ClsModuleDataService().GetCollaborativeModules(intRoleId));
                }
            }
            return(obj);
        }