public ClsUserInfo User_GetByID(int ID) { try { ClsUserInfo obj = new ClsUserInfo(); if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap) { List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>(); DataSet ds; try { ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.EndpointNotFoundException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.CommunicationException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } if (!obj.MapData(ds.Tables[0])) { obj = null; } } else { if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp) { List <clsSqlParametersInfo> lstSP = new List <clsSqlParametersInfo>(); DataSet ds; try { ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.EndpointNotFoundException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.CommunicationException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } if (!obj.MapData(ds.Tables[0])) { obj = null; } } else { DataSet ds = new VMukti.DataAccess.ClsUserInfoDataService().User_GetByID(ID); if (!obj.MapData(ds.Tables[0])) { obj = null; } } } return(obj); } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); return(null); } }
public void pgHome_VMuktiEvent_Conference(object sender, VMuktiAPI.VMuktiEventArgs e) { try { VMukti.App.blnIsTwoPanel = true; if (!VMuktiAPI.VMuktiInfo.CurrentPeer.ConferenceUser.ContainsKey(int.Parse(e._args[0].ToString()))) { bool started = false; List<string> lstParticipantUsers = new List<string>(); ClsConferenceUsersCollection objConfInfo = ClsConferenceUsersCollection.GetConfInfo(int.Parse(e._args[0].ToString())); ClsConferenceUsers objConfStartedUser = new ClsConferenceUsers(); for (int CntConfUser = 0; CntConfUser < objConfInfo.Count; CntConfUser++) { if (objConfInfo[CntConfUser].Started) { objConfStartedUser = objConfInfo[CntConfUser]; started = true; break; } } if (!started) { objAmit.Visibility = Visibility.Collapsed; objBuddies.btnClose_Click(null,null); System.Threading.Thread.Sleep(1000); // ObjBuddy_CloseBuddy(); blOpenMExp = false; btnMExp_Click(null, null); ClsConferenceCollection objGetConfInfo = ClsConferenceCollection.GetUserConferences(int.Parse(e._args[0].ToString())); objVMuktiGrid.LoadPage(objGetConfInfo[0].PageID, int.Parse(e._args[0].ToString())); ClsConferenceUsers objUpdateStarted = new ClsConferenceUsers(); objUpdateStarted.UpdateStarted(int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.ID, true); VMuktiAPI.VMuktiInfo.CurrentPeer.ConferenceUser.Add(int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.ID); ClsConferenceUsersCollection objGetConParticipants = ClsConferenceUsersCollection.GetConfParticipants(int.Parse(e._args[0].ToString())); for (int PartCnt = 0; PartCnt < objGetConParticipants.Count; PartCnt++) { ClsUserInfo objGetUserInfo = new ClsUserInfo().User_GetByID(objGetConParticipants[PartCnt].UserID); lstParticipantUsers.Add(objGetUserInfo.DisplayName); } //ClsException.WriteToLogFile("lstParticipantUsers.Count " + lstParticipantUsers.Count.ToString()); if (lstParticipantUsers.Count > 0) { if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == PeerType.NodeWithHttp) { App.chHttpSuperNodeService.svcEnterConf(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, lstParticipantUsers, int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP); } else { App.chNetP2PSuperNodeChannel.svcEnterConf(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, lstParticipantUsers, int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP); } } } else { if (objConfStartedUser != null) { ClsUserInfo objGetByID = new ClsUserInfo().User_GetByID(objConfStartedUser.UserID); if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == PeerType.NodeWithHttp) { App.chHttpSuperNodeService.svcJoinConf(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, objGetByID.DisplayName, int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP); } else { App.chNetP2PSuperNodeChannel.svcJoinConf(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, objGetByID.DisplayName, int.Parse(e._args[0].ToString()), VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP); } } VMuktiAPI.VMuktiInfo.CurrentPeer.ConferenceUser.Add(int.Parse(e._args[0].ToString()), objConfStartedUser.UserID); } } else { MessageBox.Show("Conference Already Started", "Conference", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "pgHome_VMuktiEvent_Conference()", "pgHome.xaml.cs"); } }
public ClsUserInfo User_GetByID(int ID) { try { ClsUserInfo obj = new ClsUserInfo(); if (bool.Parse(VMuktiAPI.VMuktiInfo.Port80) && VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType != PeerType.BootStrap) { List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>(); DataSet ds; try { ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.EndpointNotFoundException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.CommunicationException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } if (!obj.MapData(ds.Tables[0])) obj = null; } else { if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp) { List<clsSqlParametersInfo> lstSP = new List<clsSqlParametersInfo>(); DataSet ds; try { ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.EndpointNotFoundException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } catch (System.ServiceModel.CommunicationException e) { VMuktiHelper.ExceptionHandler(e, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null); ds = VMukti.Business.clsDataBaseChannel.chHttpDataBaseService.svcExecuteDataSet("select * from UserInfo where ID=" + ID).dsInfo; } if (!obj.MapData(ds.Tables[0])) obj = null; } else { DataSet ds = new VMukti.DataAccess.ClsUserInfoDataService().User_GetByID(ID); if (!obj.MapData(ds.Tables[0])) obj = null; } } return obj; } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, System.Reflection.MethodInfo.GetCurrentMethod().Name, "clsUserInfo.cs"); return null; } }