public static ClsPageCollection GetUPageAllocated(int intUserId)
        {
            try
            {
                ClsPageCollection obj = new ClsPageCollection();
                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     = "@pUserID";
                    objInfo.PValue    = intUserId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    lstSP.Add(objInfo);

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

                    obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGetUsersPageAllocated", 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     = "@pUserID";
                        objInfo.PValue    = intUserId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        lstSP.Add(objInfo);

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

                        obj.MapObjects(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGetUsersPageAllocated", CSqlInfo).dsInfo);
                    }
                    else
                    {
                        obj.MapObjects(new ClsPageDataService().GetPageAllocated(intUserId));
                    }
                }
                return(obj);
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "GetUPageAllocated", "ClsPageCollection.cs");
                return(null);
            }
        }
Exemple #2
0
        public int Get_PageMaxId()
        {
            try
            {
                if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap)
                {
                    List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName     = "@pReturnMaxID";
                    objInfo.PValue    = -1;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    lstSP.Add(objInfo);

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

                    return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPageAllocation", CSqlInfo).ToString()));
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Output";
                        objInfo.PName     = "@pReturnMaxID";
                        objInfo.PValue    = -1;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        lstSP.Add(objInfo);

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

                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPageAllocation", CSqlInfo).ToString()));
                    }
                    else
                    {
                        return(new ClsPageDataService().GetMaxPageId());
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Get_PageMaxId", "clsPage.cs");
                return(-1);
            }
        }
Exemple #3
0
        public DataSet Get_TabPage(int intPageId)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intPageId;
                    objInfo.PDBType   = "Int";
                    objInfo.PSize     = 200;

                    lstSP.Add(objInfo);

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

                    return(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGTabPage", 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     = "@pID";
                        objInfo.PValue    = intPageId;
                        objInfo.PDBType   = "Int";
                        objInfo.PSize     = 200;

                        lstSP.Add(objInfo);

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

                        return(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGTabPage", CSqlInfo).dsInfo);
                    }
                    else
                    {
                        return(new ClsTabDataService().GetTabPage(intPageId));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Get_TabPage()", "ClsTab.cs");
                return(null);
            }
        }
Exemple #4
0
        public void Remove_Pod(int intPodID)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intPodID;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    lstSP.Add(objInfo);

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

                    VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spDPODLayout", CSqlInfo);
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = intPodID;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        lstSP.Add(objInfo);

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

                        VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spDPODLayout", CSqlInfo);
                    }
                    else
                    {
                        new ClsPodDataService().RemovePod(intPodID);
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Remove_PodTab()", "ClsPod.cs");
            }
        }
Exemple #5
0
        public int Add_Tab(int intTabId, int intPageId, int intTabPosition, string strTabTitle, string strTabDesc, int intUserId, double C1WidthTab, double C2WidthTab, double C3WidthTab, double C4HeigthTab, double C5HeightTab)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intTabId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName     = "@pPageID";
                    objInfo2.PValue    = intPageId;
                    objInfo2.PDBType   = "BigInt";
                    objInfo2.PSize     = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName     = "@pTabPosition";
                    objInfo3.PValue    = intTabPosition;
                    objInfo3.PDBType   = "Int";
                    objInfo3.PSize     = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName     = "@pTabTitle";
                    objInfo4.PValue    = strTabTitle;
                    objInfo4.PDBType   = "NVarChar";
                    objInfo4.PSize     = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName     = "@pDescription";
                    objInfo5.PValue    = strTabDesc;
                    objInfo5.PDBType   = "NVarchar";
                    objInfo5.PSize     = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName     = "@pGivenID";
                    objInfo6.PValue    = intUserId;
                    objInfo6.PDBType   = "BigInt";
                    objInfo6.PSize     = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName     = "@pC1Width";
                    objInfo7.PValue    = C1WidthTab;
                    objInfo7.PDBType   = "Float";
                    objInfo7.PSize     = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName     = "@pC2Width";
                    objInfo8.PValue    = C2WidthTab;
                    objInfo8.PDBType   = "Float";
                    objInfo8.PSize     = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName     = "@pC3Width";
                    objInfo9.PValue    = C3WidthTab;
                    objInfo9.PDBType   = "Float";
                    objInfo9.PSize     = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName     = "@pC4Height";
                    objInfo10.PValue    = C4HeigthTab;
                    objInfo10.PDBType   = "Float";
                    objInfo10.PSize     = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Input";
                    objInfo11.PName     = "@pC5Height";
                    objInfo11.PValue    = C5HeightTab;
                    objInfo11.PDBType   = "Float";
                    objInfo11.PSize     = 200;

                    clsSqlParametersInfo objInfo12 = new clsSqlParametersInfo();
                    objInfo12.Direction = "Output";
                    objInfo12.PName     = "@pReturnMaxID";
                    objInfo12.PValue    = -1;
                    objInfo12.PDBType   = "BigInt";
                    objInfo12.PSize     = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10);
                    lstSP.Add(objInfo11);
                    lstSP.Add(objInfo12);

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

                    return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAETabs", CSqlInfo).ToString()));
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = intTabId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Input";
                        objInfo2.PName     = "@pPageID";
                        objInfo2.PValue    = intPageId;
                        objInfo2.PDBType   = "BigInt";
                        objInfo2.PSize     = 200;

                        clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                        objInfo3.Direction = "Input";
                        objInfo3.PName     = "@pTabPosition";
                        objInfo3.PValue    = intTabPosition;
                        objInfo3.PDBType   = "Int";
                        objInfo3.PSize     = 200;

                        clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                        objInfo4.Direction = "Input";
                        objInfo4.PName     = "@pTabTitle";
                        objInfo4.PValue    = strTabTitle;
                        objInfo4.PDBType   = "NVarChar";
                        objInfo4.PSize     = 200;

                        clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                        objInfo5.Direction = "Input";
                        objInfo5.PName     = "@pDescription";
                        objInfo5.PValue    = strTabDesc;
                        objInfo5.PDBType   = "NVarchar";
                        objInfo5.PSize     = 200;

                        clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                        objInfo6.Direction = "Input";
                        objInfo6.PName     = "@pGivenID";
                        objInfo6.PValue    = intUserId;
                        objInfo6.PDBType   = "BigInt";
                        objInfo6.PSize     = 200;

                        clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                        objInfo7.Direction = "Input";
                        objInfo7.PName     = "@pC1Width";
                        objInfo7.PValue    = C1WidthTab;
                        objInfo7.PDBType   = "Float";
                        objInfo7.PSize     = 200;

                        clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                        objInfo8.Direction = "Input";
                        objInfo8.PName     = "@pC2Width";
                        objInfo8.PValue    = C2WidthTab;
                        objInfo8.PDBType   = "Float";
                        objInfo8.PSize     = 200;

                        clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                        objInfo9.Direction = "Input";
                        objInfo9.PName     = "@pC3Width";
                        objInfo9.PValue    = C3WidthTab;
                        objInfo9.PDBType   = "Float";
                        objInfo9.PSize     = 200;

                        clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                        objInfo10.Direction = "Input";
                        objInfo10.PName     = "@pC4Height";
                        objInfo10.PValue    = C4HeigthTab;
                        objInfo10.PDBType   = "Float";
                        objInfo10.PSize     = 200;

                        clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                        objInfo11.Direction = "Input";
                        objInfo11.PName     = "@pC5Height";
                        objInfo11.PValue    = C5HeightTab;
                        objInfo11.PDBType   = "Float";
                        objInfo11.PSize     = 200;

                        clsSqlParametersInfo objInfo12 = new clsSqlParametersInfo();
                        objInfo12.Direction = "Output";
                        objInfo12.PName     = "@pReturnMaxID";
                        objInfo12.PValue    = -1;
                        objInfo12.PDBType   = "BigInt";
                        objInfo12.PSize     = 200;

                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo2);
                        lstSP.Add(objInfo3);
                        lstSP.Add(objInfo4);
                        lstSP.Add(objInfo5);
                        lstSP.Add(objInfo6);
                        lstSP.Add(objInfo7);
                        lstSP.Add(objInfo8);
                        lstSP.Add(objInfo9);
                        lstSP.Add(objInfo10);
                        lstSP.Add(objInfo11);
                        lstSP.Add(objInfo12);

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

                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAETabs", CSqlInfo).ToString()));
                    }
                    else
                    {
                        return(new ClsTabDataService().AddTab(intTabId, intPageId, intTabPosition, strTabTitle, strTabDesc, intUserId, C1WidthTab, C2WidthTab, C3WidthTab, C4HeigthTab, C5HeightTab));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Add_Tab()", "ClsTab.cs");
                return(-1);
            }
        }
Exemple #6
0
        public DataSet Get_TabPage(int intPageId)
        {
            try
            {
                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 = "@pID";
                    objInfo.PValue = intPageId;
                    objInfo.PDBType = "Int";
                    objInfo.PSize = 200;

                    lstSP.Add(objInfo);

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

                    return VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGTabPage", 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 = "@pID";
                    objInfo.PValue = intPageId;
                    objInfo.PDBType = "Int";
                    objInfo.PSize = 200;

                    lstSP.Add(objInfo);

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

                    return VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spGTabPage", CSqlInfo).dsInfo;
                }
                else
                {
                    return (new ClsTabDataService().GetTabPage(intPageId));
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Get_TabPage()", "ClsTab.cs");               
                return null;
            }
        }
Exemple #7
0
        public void Remove_Tab(int intTabId)
        {
            try
            {

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

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pID";
                    objInfo.PValue = intTabId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

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

                    VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spDTabs", CSqlInfo);
                    
                }
                else
                {

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

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pID";
                    objInfo.PValue = intTabId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

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

                    VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spDTabs", CSqlInfo);
                }
                else
                {
                    new ClsTabDataService().RemoveTab(intTabId);
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Remove_Tab()", "ClsTab.cs");   
            }
        }
Exemple #8
0
        public int Get_TabMaxId()
        {
            try
            {

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

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pReturnMaxID";
                    objInfo.PValue = -1;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spGMaxTabId", CSqlInfo).ToString());
                    
                }
                else
                {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pReturnMaxID";
                    objInfo.PValue = -1;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spGMaxTabId", CSqlInfo).ToString());
                }
                else
                {
                    return (new ClsTabDataService().GetMaxTabId());
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Get_TabMaxId()", "ClsTab.cs");                 
                return -1;
            }
        }
Exemple #9
0
        public static int AddPod(int PodId, int TabId, string strPodTitle, int intColumnID, string IFile, int intModuleId, int intUserid)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = PodId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName     = "@pTabID";
                    objInfo1.PValue    = TabId;
                    objInfo1.PDBType   = "BigInt";
                    objInfo1.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName     = "@pPodTitle";
                    objInfo2.PValue    = strPodTitle;
                    objInfo2.PDBType   = "NVarChar";
                    objInfo2.PSize     = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName     = "@pColumnID";
                    objInfo3.PValue    = intColumnID;
                    objInfo3.PDBType   = "BigInt";
                    objInfo3.PSize     = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName     = "@pIconFile";
                    objInfo4.PValue    = IFile;
                    objInfo4.PDBType   = "NVarChar";
                    objInfo4.PSize     = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName     = "@pModuleID";
                    objInfo5.PValue    = intModuleId;
                    objInfo5.PDBType   = "BigInt";
                    objInfo5.PSize     = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName     = "@pUserID";
                    objInfo6.PValue    = intUserid;
                    objInfo6.PDBType   = "BigInt";
                    objInfo6.PSize     = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Output";
                    objInfo7.PName     = "@pReturnMaxID";
                    objInfo7.PValue    = -1;
                    objInfo7.PDBType   = "BigInt";
                    objInfo7.PSize     = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo1);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);

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

                    return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPODLayout", CSqlInfo).ToString()));
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = PodId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                        objInfo1.Direction = "Input";
                        objInfo1.PName     = "@pTabID";
                        objInfo1.PValue    = TabId;
                        objInfo1.PDBType   = "BigInt";
                        objInfo1.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Input";
                        objInfo2.PName     = "@pPodTitle";
                        objInfo2.PValue    = strPodTitle;
                        objInfo2.PDBType   = "NVarChar";
                        objInfo2.PSize     = 200;

                        clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                        objInfo3.Direction = "Input";
                        objInfo3.PName     = "@pColumnID";
                        objInfo3.PValue    = intColumnID;
                        objInfo3.PDBType   = "BigInt";
                        objInfo3.PSize     = 200;

                        clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                        objInfo4.Direction = "Input";
                        objInfo4.PName     = "@pIconFile";
                        objInfo4.PValue    = IFile;
                        objInfo4.PDBType   = "NVarChar";
                        objInfo4.PSize     = 200;

                        clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                        objInfo5.Direction = "Input";
                        objInfo5.PName     = "@pModuleID";
                        objInfo5.PValue    = intModuleId;
                        objInfo5.PDBType   = "BigInt";
                        objInfo5.PSize     = 200;

                        clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                        objInfo6.Direction = "Input";
                        objInfo6.PName     = "@pUserID";
                        objInfo6.PValue    = intUserid;
                        objInfo6.PDBType   = "BigInt";
                        objInfo6.PSize     = 200;

                        clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                        objInfo7.Direction = "Output";
                        objInfo7.PName     = "@pReturnMaxID";
                        objInfo7.PValue    = -1;
                        objInfo7.PDBType   = "BigInt";
                        objInfo7.PSize     = 200;

                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo1);
                        lstSP.Add(objInfo2);
                        lstSP.Add(objInfo3);
                        lstSP.Add(objInfo4);
                        lstSP.Add(objInfo5);
                        lstSP.Add(objInfo6);
                        lstSP.Add(objInfo7);

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

                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPODLayout", CSqlInfo).ToString()));
                    }
                    else
                    {
                        return(new ClsPodDataService().Add_Pod(PodId, TabId, strPodTitle, intColumnID, IFile, intModuleId, intUserid));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "AddPod()", "ClsPod.cs");
                return(-1);
            }
        }
        public static ClsModuleCollection GetCMod(int intRoleId)
        {
            try
            {
                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);

                    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("spGCModules", CSqlInfo).dsInfo);
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "GetCMod(int intRoleId)", "ClsModuleCollection.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, "GetCMod(int intRoleId)", "ClsModuleCollection.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);

                        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("spGCModules", CSqlInfo).dsInfo);
                        }
                        catch (System.ServiceModel.EndpointNotFoundException e)
                        {
                            VMuktiHelper.ExceptionHandler(e, "GetCMod(int intRoleId)", "ClsModuleCollection.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, "GetCMod(int intRoleId)", "ClsModuleCollection.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);
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "GetCMod()", "ClsModuleCollection.cs");
                return(null);
            }
        }
Exemple #11
0
        public static int AddPod(int PodId, int TabId, string strPodTitle, int intColumnID, string IFile, int intModuleId, int intUserid)
        {
            try
            {

                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 = "@pID";
                    objInfo.PValue = PodId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pTabID";
                    objInfo1.PValue = TabId;
                    objInfo1.PDBType = "BigInt";
                    objInfo1.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pPodTitle";
                    objInfo2.PValue = strPodTitle;
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pColumnID";
                    objInfo3.PValue = intColumnID;
                    objInfo3.PDBType = "BigInt";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pIconFile";
                    objInfo4.PValue = IFile;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pModuleID";
                    objInfo5.PValue = intModuleId;
                    objInfo5.PDBType = "BigInt";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pUserID";
                    objInfo6.PValue = intUserid;
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Output";
                    objInfo7.PName = "@pReturnMaxID";
                    objInfo7.PValue = -1;
                    objInfo7.PDBType = "BigInt";
                    objInfo7.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo1);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPODLayout", CSqlInfo).ToString());
                    
                }
                else
                {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                   
                    List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PValue = PodId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pTabID";
                    objInfo1.PValue = TabId;
                    objInfo1.PDBType = "BigInt";
                    objInfo1.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pPodTitle";
                    objInfo2.PValue = strPodTitle;
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pColumnID";
                    objInfo3.PValue = intColumnID;
                    objInfo3.PDBType = "BigInt";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pIconFile";
                    objInfo4.PValue = IFile;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pModuleID";
                    objInfo5.PValue = intModuleId;
                    objInfo5.PDBType = "BigInt";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pUserID";
                    objInfo6.PValue = intUserid;
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Output";
                    objInfo7.PName = "@pReturnMaxID";
                    objInfo7.PValue = -1;
                    objInfo7.PDBType = "BigInt";
                    objInfo7.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo1);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPODLayout", CSqlInfo).ToString());
                }
                else
                {
                    return (new ClsPodDataService().Add_Pod(PodId, TabId, strPodTitle, intColumnID, IFile, intModuleId, intUserid));
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "AddPod()", "ClsPod.cs");             
                return -1;
            }
        }
Exemple #12
0
        public bool ModuleExists(string strModName)
        {
            try
            {
                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     = "@pModuleName";
                    objInfo.PValue    = strModName;
                    objInfo.PDBType   = "NVarChar";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Output";
                    objInfo2.PName     = "@Result";
                    objInfo2.PValue    = -1;
                    objInfo2.PDBType   = "Bit";
                    objInfo2.PSize     = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);

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

                    try
                    {
                        return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                    }
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pModuleName";
                        objInfo.PValue    = strModName;
                        objInfo.PDBType   = "NVarChar";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Output";
                        objInfo2.PName     = "@Result";
                        objInfo2.PValue    = -1;
                        objInfo2.PDBType   = "Bit";
                        objInfo2.PSize     = 200;

                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo2);

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

                        try
                        {
                            return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                        }
                        catch (System.ServiceModel.EndpointNotFoundException e)
                        {
                            VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                            VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                            return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                        }
                        catch (System.ServiceModel.CommunicationException e)
                        {
                            VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                            VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                            return(bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString()));
                        }
                    }
                    else
                    {
                        return(new ClsModuleDataService().Module_Exists(strModName));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "ModuleExists", "ClsModule.cs");
                return(false);
            }
        }
Exemple #13
0
        public int AddModule(int intModId, string strModName, string strModVersion, string strDesc, string strAssFile, string strClassFile, string strZipFile, int intUserid, bool blnIsCollaborative, bool blnNeedAuth)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intModId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName     = "@pModuleName";
                    objInfo2.PValue    = strModName;
                    objInfo2.PDBType   = "NVarChar";
                    objInfo2.PSize     = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName     = "@pModuleVersion";
                    objInfo3.PValue    = strModVersion;
                    objInfo3.PDBType   = "NVarChar";
                    objInfo3.PSize     = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName     = "@pDescription";
                    objInfo4.PValue    = strDesc;
                    objInfo4.PDBType   = "NVarChar";
                    objInfo4.PSize     = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName     = "@pAssemblyFile";
                    objInfo5.PValue    = strAssFile;
                    objInfo5.PDBType   = "NVarChar";
                    objInfo5.PSize     = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName     = "@pClassName";
                    objInfo6.PValue    = strClassFile;
                    objInfo6.PDBType   = "NVarChar";
                    objInfo6.PSize     = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName     = "@pZipFile";
                    objInfo7.PValue    = strZipFile;
                    objInfo7.PDBType   = "NVarChar";
                    objInfo7.PSize     = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName     = "@pUserID";
                    objInfo8.PValue    = intUserid;
                    objInfo8.PDBType   = "BigInt";
                    objInfo8.PSize     = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName     = "@pIsCollaborative";
                    objInfo9.PValue    = blnIsCollaborative;
                    objInfo9.PDBType   = "Bit";
                    objInfo9.PSize     = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName     = "@pNeedsAuthentication";
                    objInfo10.PValue    = blnNeedAuth;
                    objInfo10.PDBType   = "Bit";
                    objInfo10.PSize     = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Output";
                    objInfo11.PName     = "@pReturnMaxID";
                    objInfo11.PValue    = -1;
                    objInfo11.PDBType   = "BigInt";
                    objInfo11.PSize     = 200;


                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10);
                    lstSP.Add(objInfo11);


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

                    try
                    {
                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                    }
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = intModId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Input";
                        objInfo2.PName     = "@pModuleName";
                        objInfo2.PValue    = strModName;
                        objInfo2.PDBType   = "NVarChar";
                        objInfo2.PSize     = 200;

                        clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                        objInfo3.Direction = "Input";
                        objInfo3.PName     = "@pModuleVersion";
                        objInfo3.PValue    = strModVersion;
                        objInfo3.PDBType   = "NVarChar";
                        objInfo3.PSize     = 200;

                        clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                        objInfo4.Direction = "Input";
                        objInfo4.PName     = "@pDescription";
                        objInfo4.PValue    = strDesc;
                        objInfo4.PDBType   = "NVarChar";
                        objInfo4.PSize     = 200;

                        clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                        objInfo5.Direction = "Input";
                        objInfo5.PName     = "@pAssemblyFile";
                        objInfo5.PValue    = strAssFile;
                        objInfo5.PDBType   = "NVarChar";
                        objInfo5.PSize     = 200;

                        clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                        objInfo6.Direction = "Input";
                        objInfo6.PName     = "@pClassName";
                        objInfo6.PValue    = strClassFile;
                        objInfo6.PDBType   = "NVarChar";
                        objInfo6.PSize     = 200;

                        clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                        objInfo7.Direction = "Input";
                        objInfo7.PName     = "@pZipFile";
                        objInfo7.PValue    = strZipFile;
                        objInfo7.PDBType   = "NVarChar";
                        objInfo7.PSize     = 200;

                        clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                        objInfo8.Direction = "Input";
                        objInfo8.PName     = "@pUserID";
                        objInfo8.PValue    = intUserid;
                        objInfo8.PDBType   = "BigInt";
                        objInfo8.PSize     = 200;

                        clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                        objInfo9.Direction = "Input";
                        objInfo9.PName     = "@pIsCollaborative";
                        objInfo9.PValue    = blnIsCollaborative;
                        objInfo9.PDBType   = "Bit";
                        objInfo9.PSize     = 200;

                        clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                        objInfo10.Direction = "Input";
                        objInfo10.PName     = "@pNeedsAuthentication";
                        objInfo10.PValue    = blnNeedAuth;
                        objInfo10.PDBType   = "Bit";
                        objInfo10.PSize     = 200;

                        clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                        objInfo11.Direction = "Output";
                        objInfo11.PName     = "@pReturnMaxID";
                        objInfo11.PValue    = -1;
                        objInfo11.PDBType   = "BigInt";
                        objInfo11.PSize     = 200;


                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo2);
                        lstSP.Add(objInfo3);
                        lstSP.Add(objInfo4);
                        lstSP.Add(objInfo5);
                        lstSP.Add(objInfo6);
                        lstSP.Add(objInfo7);
                        lstSP.Add(objInfo8);
                        lstSP.Add(objInfo9);
                        lstSP.Add(objInfo10);
                        lstSP.Add(objInfo11);


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

                        try
                        {
                            return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                        }
                        catch (System.ServiceModel.EndpointNotFoundException e)
                        {
                            VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                            VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                            return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                        }
                        catch (System.ServiceModel.CommunicationException e)
                        {
                            VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                            VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                            return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString()));
                        }
                    }
                    else
                    {
                        return(new ClsModuleDataService().Add_Module(intModId, strModName, strModVersion, strDesc, strAssFile, strClassFile, strZipFile, intUserid, blnIsCollaborative, blnNeedAuth));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "AddModule", "ClsModule.cs");
                return(-1);
            }
        }
Exemple #14
0
        public int Add_Page(int intPageId, string strPageTitle, string strPageDesc, bool blnIsPublic, int intUserId)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intPageId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName     = "@pPageTitle";
                    objInfo2.PValue    = strPageTitle;
                    objInfo2.PDBType   = "NVarChar";
                    objInfo2.PSize     = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName     = "@pDescription";
                    objInfo3.PValue    = strPageDesc;
                    objInfo3.PDBType   = "NVarChar";
                    objInfo3.PSize     = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName     = "@pIsPublic";
                    objInfo4.PValue    = blnIsPublic;
                    objInfo4.PDBType   = "Bit";
                    objInfo4.PSize     = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName     = "@pUserID";
                    objInfo5.PValue    = intUserId;
                    objInfo5.PDBType   = "BigInt";
                    objInfo5.PSize     = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Output";
                    objInfo6.PName     = "@pReturnMaxID";
                    objInfo6.PValue    = -1;
                    objInfo6.PDBType   = "BigInt";
                    objInfo6.PSize     = 200;


                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);

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

                    return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPage", CSqlInfo).ToString()));
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = intPageId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Input";
                        objInfo2.PName     = "@pPageTitle";
                        objInfo2.PValue    = strPageTitle;
                        objInfo2.PDBType   = "NVarChar";
                        objInfo2.PSize     = 200;

                        clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                        objInfo3.Direction = "Input";
                        objInfo3.PName     = "@pDescription";
                        objInfo3.PValue    = strPageDesc;
                        objInfo3.PDBType   = "NVarChar";
                        objInfo3.PSize     = 200;

                        clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                        objInfo4.Direction = "Input";
                        objInfo4.PName     = "@pIsPublic";
                        objInfo4.PValue    = blnIsPublic;
                        objInfo4.PDBType   = "Bit";
                        objInfo4.PSize     = 200;

                        clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                        objInfo5.Direction = "Input";
                        objInfo5.PName     = "@pUserID";
                        objInfo5.PValue    = intUserId;
                        objInfo5.PDBType   = "BigInt";
                        objInfo5.PSize     = 200;

                        clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                        objInfo6.Direction = "Output";
                        objInfo6.PName     = "@pReturnMaxID";
                        objInfo6.PValue    = -1;
                        objInfo6.PDBType   = "BigInt";
                        objInfo6.PSize     = 200;


                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo2);
                        lstSP.Add(objInfo3);
                        lstSP.Add(objInfo4);
                        lstSP.Add(objInfo5);
                        lstSP.Add(objInfo6);

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

                        return(int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEPage", CSqlInfo).ToString()));
                    }
                    else
                    {
                        return(new ClsPageDataService().AddPage(intPageId, strPageTitle, strPageDesc, blnIsPublic, intUserId));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Add_Page()", "clsPage.cs");
                return(-1);
            }
        }
Exemple #15
0
        public  int AddModule(int intModId, string strModName, string strModVersion, string strDesc, string strAssFile, string strClassFile, string strZipFile, int intUserid, bool blnIsCollaborative, bool blnNeedAuth)
        {

            try
            {

                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 = "@pID";
                    objInfo.PValue = intModId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pModuleName";
                    objInfo2.PValue = strModName;
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pModuleVersion";
                    objInfo3.PValue = strModVersion;
                    objInfo3.PDBType = "NVarChar";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pDescription";
                    objInfo4.PValue = strDesc;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pAssemblyFile";
                    objInfo5.PValue = strAssFile;
                    objInfo5.PDBType = "NVarChar";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pClassName";
                    objInfo6.PValue = strClassFile;
                    objInfo6.PDBType = "NVarChar";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName = "@pZipFile";
                    objInfo7.PValue = strZipFile;
                    objInfo7.PDBType = "NVarChar";
                    objInfo7.PSize = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pUserID";
                    objInfo8.PValue = intUserid;
                    objInfo8.PDBType = "BigInt";
                    objInfo8.PSize = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pIsCollaborative";
                    objInfo9.PValue = blnIsCollaborative;
                    objInfo9.PDBType = "Bit";
                    objInfo9.PSize = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName = "@pNeedsAuthentication";
                    objInfo10.PValue = blnNeedAuth;
                    objInfo10.PDBType = "Bit";
                    objInfo10.PSize = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Output";
                    objInfo11.PName = "@pReturnMaxID";
                    objInfo11.PValue = -1;
                    objInfo11.PDBType = "BigInt";
                    objInfo11.PSize = 200;


                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10);
                    lstSP.Add(objInfo11);


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

                    try
                    {
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }



                }
                else
                {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {

                    List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PValue = intModId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pModuleName";
                    objInfo2.PValue = strModName;
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pModuleVersion";
                    objInfo3.PValue = strModVersion;
                    objInfo3.PDBType = "NVarChar";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pDescription";
                    objInfo4.PValue = strDesc;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pAssemblyFile";
                    objInfo5.PValue = strAssFile;
                    objInfo5.PDBType = "NVarChar";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pClassName";
                    objInfo6.PValue = strClassFile;
                    objInfo6.PDBType = "NVarChar";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName = "@pZipFile";
                    objInfo7.PValue = strZipFile;
                    objInfo7.PDBType = "NVarChar";
                    objInfo7.PSize = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pUserID";
                    objInfo8.PValue = intUserid;
                    objInfo8.PDBType = "BigInt";
                    objInfo8.PSize = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pIsCollaborative";
                    objInfo9.PValue = blnIsCollaborative;
                    objInfo9.PDBType = "Bit";
                    objInfo9.PSize = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName = "@pNeedsAuthentication";
                    objInfo10.PValue = blnNeedAuth;
                    objInfo10.PDBType = "Bit";
                    objInfo10.PSize = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Output";
                    objInfo11.PName = "@pReturnMaxID";
                    objInfo11.PValue = -1;
                    objInfo11.PDBType = "BigInt";
                    objInfo11.PSize = 200;


                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10);
                    lstSP.Add(objInfo11);


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

                    try
                    {
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "AddModule(int ...)", "clsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAEModule", CSqlInfo).ToString());
                    }


                }
                else
                {
                    return (new ClsModuleDataService().Add_Module(intModId, strModName, strModVersion, strDesc, strAssFile, strClassFile, strZipFile, intUserid, blnIsCollaborative, blnNeedAuth));
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "AddModule", "ClsModule.cs");             
                return -1;
            }
        }
Exemple #16
0
        public int Add_Tab(int intTabId, int intPageId, int intTabPosition, string strTabTitle, string strTabDesc, int intUserId, double C1WidthTab, double C2WidthTab, double C3WidthTab, double C4HeigthTab, double C5HeightTab)
        {
            try
            {

                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 = "@pID";
                    objInfo.PValue = intTabId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pPageID";
                    objInfo2.PValue = intPageId;
                    objInfo2.PDBType = "BigInt";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pTabPosition";
                    objInfo3.PValue = intTabPosition;
                    objInfo3.PDBType = "Int";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pTabTitle";
                    objInfo4.PValue = strTabTitle;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pDescription";
                    objInfo5.PValue = strTabDesc;
                    objInfo5.PDBType = "NVarchar";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pGivenID";
                    objInfo6.PValue = intUserId;
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName = "@pC1Width";
                    objInfo7.PValue = C1WidthTab;
                    objInfo7.PDBType = "Float";
                    objInfo7.PSize = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pC2Width";
                    objInfo8.PValue = C2WidthTab;
                    objInfo8.PDBType = "Float";
                    objInfo8.PSize = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pC3Width";
                    objInfo9.PValue = C3WidthTab;
                    objInfo9.PDBType = "Float";
                    objInfo9.PSize = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName = "@pC4Height";
                    objInfo10.PValue = C4HeigthTab;
                    objInfo10.PDBType = "Float";
                    objInfo10.PSize = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Input";
                    objInfo11.PName = "@pC5Height";
                    objInfo11.PValue = C5HeightTab;
                    objInfo11.PDBType = "Float";
                    objInfo11.PSize = 200;

                    clsSqlParametersInfo objInfo12 = new clsSqlParametersInfo();
                    objInfo12.Direction = "Output";
                    objInfo12.PName = "@pReturnMaxID";
                    objInfo12.PValue = -1;
                    objInfo12.PDBType = "BigInt";
                    objInfo12.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10);
                    lstSP.Add(objInfo11);
                    lstSP.Add(objInfo12);

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAETabs", CSqlInfo).ToString());
                    
                }
                else
                {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                   List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PValue = intTabId;
                    objInfo.PDBType = "BigInt";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pPageID";
                    objInfo2.PValue = intPageId;
                    objInfo2.PDBType = "BigInt";
                    objInfo2.PSize = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pTabPosition";
                    objInfo3.PValue = intTabPosition;
                    objInfo3.PDBType = "Int";
                    objInfo3.PSize = 200;

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pTabTitle";
                    objInfo4.PValue = strTabTitle;
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PSize = 200;

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pDescription";
                    objInfo5.PValue = strTabDesc;
                    objInfo5.PDBType = "NVarchar";
                    objInfo5.PSize = 200;

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pGivenID";
                    objInfo6.PValue = intUserId;
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PSize = 200;

                    clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName = "@pC1Width";
                    objInfo7.PValue = C1WidthTab;
                    objInfo7.PDBType = "Float";
                    objInfo7.PSize = 200;

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pC2Width";
                    objInfo8.PValue = C2WidthTab;
                    objInfo8.PDBType = "Float";
                    objInfo8.PSize = 200;

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pC3Width";
                    objInfo9.PValue = C3WidthTab;
                    objInfo9.PDBType = "Float";
                    objInfo9.PSize = 200;

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName = "@pC4Height";
                    objInfo10.PValue = C4HeigthTab;
                    objInfo10.PDBType = "Float";
                    objInfo10.PSize = 200;

                    clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    objInfo11.Direction = "Input";
                    objInfo11.PName = "@pC5Height";
                    objInfo11.PValue = C5HeightTab;
                    objInfo11.PDBType = "Float";
                    objInfo11.PSize = 200;

                    clsSqlParametersInfo objInfo12 = new clsSqlParametersInfo();
                    objInfo12.Direction = "Output";
                    objInfo12.PName = "@pReturnMaxID";
                    objInfo12.PValue = -1;
                    objInfo12.PDBType = "BigInt";
                    objInfo12.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);
                    lstSP.Add(objInfo4);
                    lstSP.Add(objInfo5);
                    lstSP.Add(objInfo6);
                    lstSP.Add(objInfo7);
                    lstSP.Add(objInfo8);
                    lstSP.Add(objInfo9);
                    lstSP.Add(objInfo10); 
                    lstSP.Add(objInfo11); 
                    lstSP.Add(objInfo12);

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

                    return int.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spAETabs", CSqlInfo).ToString());
                }
                else
                {
                    return (new ClsTabDataService().AddTab(intTabId, intPageId, intTabPosition, strTabTitle, strTabDesc, intUserId, C1WidthTab, C2WidthTab, C3WidthTab, C4HeigthTab, C5HeightTab));
                }
            }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Add_Tab()", "ClsTab.cs");             
                return -1;
            }
        }
Exemple #17
0
        public  bool ModuleExists(string strModName)
        {
            try
            {

                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 = "@pModuleName";
                    objInfo.PValue = strModName;
                    objInfo.PDBType = "NVarChar";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Output";
                    objInfo2.PName = "@Result";
                    objInfo2.PValue = -1;
                    objInfo2.PDBType = "Bit";
                    objInfo2.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);

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

                    try
                    {
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                }
                else
                {


                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {

                    List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pModuleName";
                    objInfo.PValue = strModName;
                    objInfo.PDBType = "NVarChar";
                    objInfo.PSize = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Output";
                    objInfo2.PName = "@Result";
                    objInfo2.PValue = -1;
                    objInfo2.PDBType = "Bit";
                    objInfo2.PSize = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);

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

                    try
                    {
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.EndpointNotFoundException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");                         
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                    catch (System.ServiceModel.CommunicationException e)
                    {
                        VMuktiHelper.ExceptionHandler(e, "ModuleExists(string strModName)", "ClsModule.cs");                       
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        return bool.Parse(VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteReturnNonQuery("spModuleExists", CSqlInfo).ToString());
                    }
                }
                else
                {
                    return (new ClsModuleDataService().Module_Exists(strModName));
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "ModuleExists", "ClsModule.cs");                 
                return false;
            }
        }
Exemple #18
0
        public void Page_Allocated(int intPageAllocationId, int intPageId, int intUserid)
        {
            try
            {
                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     = "@pID";
                    objInfo.PValue    = intPageAllocationId;
                    objInfo.PDBType   = "BigInt";
                    objInfo.PSize     = 200;

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName     = "@pPageID";
                    objInfo2.PValue    = intPageId;
                    objInfo2.PDBType   = "BigInt";
                    objInfo2.PSize     = 200;

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName     = "@pUserID";
                    objInfo3.PValue    = intUserid;
                    objInfo3.PDBType   = "BigInt";
                    objInfo3.PSize     = 200;

                    lstSP.Add(objInfo);
                    lstSP.Add(objInfo2);
                    lstSP.Add(objInfo3);

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

                    VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spAEPageAllocation", CSqlInfo);
                }
                else
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                    {
                        List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>();

                        clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                        objInfo.Direction = "Input";
                        objInfo.PName     = "@pID";
                        objInfo.PValue    = intPageAllocationId;
                        objInfo.PDBType   = "BigInt";
                        objInfo.PSize     = 200;

                        clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                        objInfo2.Direction = "Input";
                        objInfo2.PName     = "@pPageID";
                        objInfo2.PValue    = intPageId;
                        objInfo2.PDBType   = "BigInt";
                        objInfo2.PSize     = 200;

                        clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                        objInfo3.Direction = "Input";
                        objInfo3.PName     = "@pUserID";
                        objInfo3.PValue    = intUserid;
                        objInfo3.PDBType   = "BigInt";
                        objInfo3.PSize     = 200;

                        lstSP.Add(objInfo);
                        lstSP.Add(objInfo2);
                        lstSP.Add(objInfo3);

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

                        VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("spAEPageAllocation", CSqlInfo);
                    }
                    else
                    {
                        new ClsPageDataService().PageAllocated(intPageAllocationId, intPageId, intUserid);
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Page_Allocated", "clsPage.cs");
            }
        }