void Awake() { if (Inst == null) { Inst = this; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
/// <summary> /// 战斗失败/胜利后退出战斗,及结算信息 /// </summary> void OnS2CFightEnd(KcpNetPack pack) { FightEnd(); LoadingManager.LoadSceneAsync(SceneConfig.InitAgain); }
public void LoadTypeClient() { List <Galatee.Silverlight.ServiceAccueil.CsCategorieClient> ListeCategClient = new List <Galatee.Silverlight.ServiceAccueil.CsCategorieClient>(); if (SessionObject.LstCategorie.Count > 0) { ListeCategClient = SessionObject.LstCategorie; cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; } else { //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des type de client ..."); service.GetTypeClientAsync(); service.GetTypeClientCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { foreach (var item in res.Result) { SessionObject.LstCategorie.Add(new Galatee.Silverlight.ServiceAccueil.CsCategorieClient { DATECREATION = item.DATECREATION, DATEMODIFICATION = item.DATEMODIFICATION, LIBELLE = item.LIBELLE, CODE = item.CODE, PK_ID = item.PK_ID, USERCREATION = item.USERCREATION, USERMODIFICATION = item.USERMODIFICATION }); } ListeCategClient = SessionObject.LstCategorie; cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } cbxtypeclient.DisplayMemberPath = "LIBELLE"; cbxtypeclient.ItemsSource = ListeCategClient; }
public List <Galatee.Silverlight.ServiceReport.CsReglement> GetPrintObjects(string module) { try { DateTime?CollectionDate = DateTime.Now.Date; annee = CollectionDate.Value.Year; MoisChoisi.Add(CollectionDate.Value.Month); string key = Utility.getKey(); //Matricule de l'agent courant listeDesCaissieresCochees.Add(UserConnecte.matricule); //if (Txt_DateDebut.IsEnabled==false) //{ // annee = (this.Txt_year.Text == string.Empty) ? 0 : int.Parse(this.Txt_year.Text); //} //else //{ // annee = (Txt_DateDebut.SelectedDate != null) ? Txt_DateDebut.SelectedDate.Value.Year : 0; //} string reportName = "PassPaymentDetail"; this.DefinedRDLC = reportName; int loaderHandler = LoadingManager.BeginLoading("Please Wait for current payment ... "); List <ServiceReport.CsReglement> reportPrint = new List <ServiceReport.CsReglement>(); List <Galatee.Silverlight.ServiceReport.CsReglement> ligne = new List <Galatee.Silverlight.ServiceReport.CsReglement>(); //Doit tenir compte des mois coché //GetAllSelectedCheckObjItem(); List <Galatee.Silverlight.ServiceCaisse.CsReglement> ListeDesFacture = new List <Galatee.Silverlight.ServiceCaisse.CsReglement>(); ReportServiceClient service = new ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint(module)); service.RPT_ETAT_ENCAISSEMENT_BY_COLLECTOR_CURRENTEAsync(listeDesCaissieresCochees, CollectionDate, annee, MoisChoisi, Edition, key, null); service.RPT_ETAT_ENCAISSEMENT_BY_COLLECTOR_CURRENTECompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { LoadingManager.EndLoading(loaderHandler); Message.ShowInformation("Erreur survenue lors de l'appel service", "ERROR"); return; } if (res.Result == null) { LoadingManager.EndLoading(loaderHandler); Message.ShowInformation("Impossible d'afficher le rapport", "ERROR"); return; } //if (res.Result != null) //{ // //Code en cas de succès // reportPrint = res.Result; // //Dictionary<string, string> param = new Dictionary<string, string>(); // Dictionary<string, string> param = null; //Effectue l'aperçcu avant imprèssion Utility.ActionPreview <ServicePrintings.CsReglement>(null, this.DefinedRDLC, module, key); //Utility.ActionPreview<ServicePrintings.CsReglement, Galatee.Silverlight.ServiceReport.CsReglement>(reportPrint, param, Etatafficher, module); //} } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; return(reportPrint); //return null; } catch (Exception ex) { throw ex; } }
private void OKButton_Click(object sender, RoutedEventArgs e) { if (null != cmbFormulaire.SelectedValue) { try { ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage")); int idFrm = int.Parse(cmbFormulaire.SelectedValue.ToString()); bool?checkboxSelected = chkboxConsultationSeulement.IsChecked; int back = LoadingManager.BeginLoading("Enregistrement ..."); if (_execMode == SessionObject.ExecMode.Creation) { ObjetSelectionne = new CsEtape() { PK_ID = 0, CODE = txtCode.Text, DESCRIPTIONETAPE = txtDescription.Text, NOM = txtNom.Text, FK_IDOPERATION = OperationGUID, FK_IDFORMULAIRE = idFrm, MODIFICATION = !checkboxSelected, CONTROLEETAPE = (0 != idFrm) ? _lsFormulaires.Where(f => f.PK_ID == idFrm) .First().FULLNAMECONTROLE : string.Empty, IS_TRAITEMENT_LOT = chkTraitementParLot.IsChecked.Value }; List <CsEtape> toInsert = new List <CsEtape>() { ObjetSelectionne }; client.InsertEtapeCompleted += (ssender, insertR) => { if (insertR.Cancelled || insertR.Error != null) { Message.ShowError(insertR.Error.Message, Languages.FenetreOperation); return; } if (!insertR.Result) { Message.ShowError(Languages.ErreurInsertionDonnees, Languages.FenetreOperation); return; } Etape = ObjetSelectionne; DialogResult = true; UpdateParentList(toInsert); LoadingManager.EndLoading(back); }; client.InsertEtapeAsync(toInsert); } else if (_execMode == SessionObject.ExecMode.Modification) { ObjetSelectionne.CODE = txtCode.Text; ObjetSelectionne.DESCRIPTIONETAPE = txtDescription.Text; ObjetSelectionne.NOM = txtNom.Text; ObjetSelectionne.FK_IDOPERATION = OperationGUID; ObjetSelectionne.FK_IDFORMULAIRE = idFrm; ObjetSelectionne.CONTROLEETAPE = (idFrm != 0) ? _lsFormulaires.Where(f => f.PK_ID == idFrm).First() .FULLNAMECONTROLE : string.Empty; ObjetSelectionne.IS_TRAITEMENT_LOT = chkTraitementParLot.IsChecked.Value; List <CsEtape> toUpdate = new List <CsEtape>() { ObjetSelectionne }; client.UpdateEtapeCompleted += (ssender, insertR) => { if (insertR.Cancelled || insertR.Error != null) { Message.ShowError(insertR.Error.Message, Languages.FenetreOperation); return; } if (!insertR.Result) { Message.ShowError(Languages.ErreurInsertionDonnees, Languages.FenetreOperation); return; } Etape = ObjetSelectionne; DialogResult = true; UpdateParentList(toUpdate); LoadingManager.EndLoading(back); }; client.UpdateEtapeAsync(toUpdate); } } catch (Exception ex) { throw ex; } } else { Message.ShowError(new Exception("Veuillez selectionner un formulaire"), "Configuration Etape"); } }
public void OnPointerClick(PointerEventData eventData) { LoadingManager.LoadingScene("Scene_StageSelect"); }
void GetData() { try { int back = LoadingManager.BeginLoading("Chargement des utilisateurs ..."); AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration")); client.RetourneListeAllUserCompleted += (ss, res) => { if (res.Cancelled || res.Error != null) { string error = res.Error.Message; Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle); LoadingManager.EndLoading(back); return; } if (res.Result == null || res.Result.Count == 0) { Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle); LoadingManager.EndLoading(back); return; } foreach (CsUtilisateur item in res.Result) { item.CENTREAFFICHER = item.CENTRE + " " + item.LIBELLECENTRE; if (item.PERIMETREACTION == 1) { item.LIBELLEPERIMETREACTION = "Centre"; } else if (item.PERIMETREACTION == 2) { item.LIBELLEPERIMETREACTION = "Site"; } else if (item.PERIMETREACTION == 3) { item.LIBELLEPERIMETREACTION = "Globale"; } } List <Galatee.Silverlight.ServiceAccueil.CsCentre> lstCentreProfil = Shared.ClasseMEthodeGenerique.RetourCentreByPerimetre(SessionObject.LstCentre, UserConnecte.listeProfilUser); List <int> lstCentreHabil = new List <int>(); foreach (var item in lstCentreProfil) { lstCentreHabil.Add(item.PK_ID); } _lstUserProfil = res.Result.Where(t => lstCentreHabil.Contains(t.FK_IDCENTRE)).ToList(); donnesDatagrid = _lstUserProfil; lvwResultat.ItemsSource = _lstUserProfil; if (_lstUserProfil != null) { lvwResultat.SelectedItem = _lstUserProfil[0]; } LoadingManager.EndLoading(back); }; client.RetourneListeAllUserAsync(); } catch (Exception ex) { throw ex; } }
IEnumerator LoadingScene(string UnloadName, string LoadName) { GameObject go = Instantiate(LoadingWnd); LoadingManager Loadingwnd = go.transform.GetChild(0).GetComponent <LoadingManager>(); AsyncOperation AO; if (UnloadName != string.Empty) { AO = SceneManager.UnloadSceneAsync(UnloadName); while (!AO.isDone) { Loadingwnd.SettingLoadingBar(0.33f); yield return(new WaitForSeconds(2)); yield return(null); } } Loadingwnd.SettingLoadingBar(0.33f); if (_currentScene == eSceneState.Play) { AO = SceneManager.LoadSceneAsync("InGameScene", LoadSceneMode.Additive); while (!AO.isDone) { Loadingwnd.SettingLoadingBar(0.66f); yield return(new WaitForSeconds(2)); yield return(null); } Loadingwnd.SettingLoadingBar(0.66f); AO = SceneManager.LoadSceneAsync(LoadName, LoadSceneMode.Additive); while (!AO.isDone) { Loadingwnd.SettingLoadingBar(1); yield return(new WaitForSeconds(2)); yield return(null); } Loadingwnd.SettingLoadingBar(1); InGameManager._instance.GameMapSetting(); } else { AO = SceneManager.UnloadSceneAsync("InGameScene"); while (!AO.isDone) { Loadingwnd.SettingLoadingBar(0.66f); yield return(null); } Loadingwnd.SettingLoadingBar(0.66f); AO = SceneManager.LoadSceneAsync(LoadName, LoadSceneMode.Additive); while (!AO.isDone) { Loadingwnd.SettingLoadingBar(1); yield return(null); } Loadingwnd.SettingLoadingBar(1); yield return(new WaitForSeconds(2)); } Destroy(Loadingwnd.transform.parent.gameObject); }
public async Task LoadDifferentItems() { LoadingManager.OnLoading(); TokenExpManger tokenExpManger = new TokenExpManger(App.TokenDto.Exp); if (tokenExpManger.IsExpired()) { await tokenExpManger.CloseSession(); LoadingManager.OffLoading(); } else { if (!KeyValues.ContainsKey("storeAdded")) { await LoadItems(); } else { var storeData = await StoreDataStore.GetDifferentStore(KeyValues["storeAdded"]); if (storeData != null) { var tempData = new List <Store>(); foreach (var item in KeyValues["storeAdded"]) { if (!tempData.Any(s => s.StoreId == item.StoreId)) { tempData.Add(item); } } foreach (var item in storeData) { if (!tempData.Any(s => s.StoreId == item.StoreId)) { tempData.Add(item); } } KeyValues.Clear(); KeyValues.Add("storeAdded", tempData); foreach (var item in KeyValues["storeAdded"]) { if (!Stores.Any(s => s.StoreId == item.StoreId)) { var storepresenter = new StorePresenters(item); Stores.Add(storepresenter); } } } } LoadingManager.OffLoading(); } }
void OnPlayOfflineButtonClicked() { LoadingManager.LoadSceneByLoadingPanel(Constants.SceneName.GameOffline); }
public void LoadMainMenu() { LoadingManager.Load(0); }
public void Retry() { LoadingManager.Load(1); }
void Awake() { instance = this; mainCamera.gameObject.SetActive(true); }
private void Awake() { _myInstance = this; myWorldGeneration = FindObjectOfType <WorldGeneration>(); }
private void GetData() { int back = 0; try { back = LoadingManager.BeginLoading("Chargement des données en cours..."); ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage")); client.SelectAllOperationCompleted += (ssender, args) => { if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.Show(error, Languages.ListeCodePoste); return; } if (args.Result == null) { Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage); return; } DonnesDatagrid.Clear(); if (args.Result != null) { List <m_CsOperation> _lesOperations = new List <m_CsOperation>(); List <CsOperation> normalOperation = args.Result; foreach (var item in args.Result.Where(i => !i.FK_ID_PARENTOPERATION.HasValue || i.FK_ID_PARENTOPERATION.Value == Guid.Empty)) { var Enfants = args.Result.Where(o => o.FK_ID_PARENTOPERATION == item.PK_ID); List <m_CsOperation> mEnfants = new List <m_CsOperation>(); Enfants.ToList().ForEach((CsOperation op) => { mEnfants.Add(new m_CsOperation() { PK_ID = op.PK_ID, DESCRIPTION = op.DESCRIPTION, CODE = op.CODE, FK_ID_PARENTOPERATION = op.FK_ID_PARENTOPERATION, FK_ID_PRODUIT = op.FK_ID_PRODUIT, FK_IDFORMULAIRE = op.FK_IDFORMULAIRE, PRODUITNAME = op.PRODUITNAME, FORMULAIRE = op.FORMULAIRE, CODE_TDEM = op.CODE_TDEM, NOM = op.NOM }); }); _lesOperations.Add(new m_CsOperation() { PK_ID = item.PK_ID, DESCRIPTION = item.DESCRIPTION, CODE = item.CODE, FK_ID_PARENTOPERATION = item.FK_ID_PARENTOPERATION, FK_ID_PRODUIT = item.FK_ID_PRODUIT, FK_IDFORMULAIRE = item.FK_IDFORMULAIRE, PRODUITNAME = item.PRODUITNAME, NOM = item.NOM, FORMULAIRE = item.FORMULAIRE, CODE_TDEM = item.CODE_TDEM, SOUS_OPERATION = mEnfants }); } //On les ajoutes aux datagrid foreach (var item in _lesOperations) { donnesDatagrid.Add(item); } } dtgrdParametre.ItemsSource = DonnesDatagrid; LoadingManager.EndLoading(back); }; client.SelectAllOperationAsync(); } catch (Exception ex) { throw ex; } }
private void OKButton_Click(object sender, RoutedEventArgs e) { try { if (Dtg_agent.SelectedItem != null) { this.BtnOK.IsEnabled = false; //var agent = Dtg_agent.SelectedItem as CsRHabilitationGrouveValidation; List <CsAffectationDemandeUser> lstAffectation = new List <CsAffectationDemandeUser>(); var agent = Dtg_agent.SelectedItem as Galatee.Silverlight.ServiceAccueil.CsUtilisateur; //Affectation de la demande if (IsOT && lAffectationDem != null) { CsAffectationDemandeUser lAffectation = new CsAffectationDemandeUser(); lAffectation.CODEDEMANDE = CodeDemande; lAffectation.FK_IDETAPE = _idEtapeSuivante; lAffectation.MATRICULEUSER = agent.MATRICULE; lAffectation.FK_IDUSERAFFECTER = agent.PK_ID; lAffectation.OPERATIONID = _OperationID; lAffectation.CENTREID = _centreID; lAffectation.WORKFLOWID = _workflowId; lAffectation.FK_IDETAPEFROM = _idEtape; lAffectation.MATRICULEUSERCREATION = UserConnecte.matricule; lAffectation.PK_ID = Guid.NewGuid(); lAffectation.FK_IDDEMANDE = IdDemande; AgentSelectionne = new ServiceAccueil.CsUtilisateur(); AgentSelectionne.MATRICULE = agent.MATRICULE; AgentSelectionne.PK_ID = agent.PK_ID; AgentSelectionne.LIBELLE = agent.LIBELLE; lAffectationDem = lAffectation; this.DialogResult = false; } else { foreach (int item in LesCodeDemande) { CsAffectationDemandeUser lAffectation = new CsAffectationDemandeUser(); lAffectation.CODEDEMANDE = CodeDemande; lAffectation.FK_IDETAPE = _idEtapeSuivante; lAffectation.MATRICULEUSER = agent.MATRICULE; lAffectation.FK_IDUSERAFFECTER = agent.PK_ID; lAffectation.OPERATIONID = _OperationID; lAffectation.CENTREID = _centreID; lAffectation.WORKFLOWID = _workflowId; lAffectation.FK_IDETAPEFROM = _idEtape; lAffectation.MATRICULEUSERCREATION = UserConnecte.matricule; lAffectation.PK_ID = Guid.NewGuid(); lAffectation.FK_IDDEMANDE = item; lstAffectation.Add(lAffectation); } int back = LoadingManager.BeginLoading("Affectation en cours ..."); Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); client.AffecterDemandeCompleted += (af_sender, args) => { LoadingManager.EndLoading(back); if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.ShowError(error, Languages.txtDevis); return; } if (args.Result == null) { Message.ShowError("Une erreur est survenue", Languages.txtDevis); return; } if (args.Result != null) { if (string.IsNullOrEmpty(args.Result)) { LoadingManager.EndLoading(back); Message.ShowInformation("Affectation", "Affectation de demande"); this.DialogResult = false; } else { LoadingManager.EndLoading(back); Message.ShowError("Affectation", "Erreur survenue à l'affectation"); } this.DialogResult = true; } }; client.AffecterDemandeAsync(lstAffectation); } } } catch (Exception ex) { Message.ShowError(ex.Message, Languages.txtDevis); } }
public void PlayGame(string sceneToLoad) { LoadingManager.LoadScene(sceneToLoad); }
void Awake() { Instance = this; }
public void LoadScene(int scene) { LoadingManager.Load(scene); }
private void S() { switch (control1) { case Control1.Camera: switch (DecorationRoomCamera.instance.viewMode) { case DecorationRoomCamera.ViewMode.lookDrone: case DecorationRoomCamera.ViewMode.lookCharacter: DecorationRoomCamera.instance.viewMode = DecorationRoomCamera.ViewMode.lookDefault; SoundEffect.instance.audioSource.PlayOneShot(highlight); UpdateControlGuide(); // 조작 가이드 업데이트 return; case DecorationRoomCamera.ViewMode.lookDefault: switch (Recorder.instance.previousScene) { case "My Room": LoadingManager.LoadScene("My Room", SceneManager.GetActiveScene().name); break; default: LoadingManager.LoadScene("IngameScene", SceneManager.GetActiveScene().name); break; } SoundEffect.instance.audioSource.PlayOneShot(closeMenu); return; } return; case Control1.UI: switch (control2) { case Control2.Drone: if (inputDelay <= 0) { CloseUI(droneDecortationUI, Control1.Camera); // 꾸미기 UI를 닫고 카메라를 조종 시작 DecorationRoomCamera.instance.viewMode = DecorationRoomCamera.ViewMode.lookDefault; UpdateControlGuide(); // 조작 가이드 업데이트 SoundEffect.instance.audioSource.PlayOneShot(closeMenu); } return; case Control2.Operator: if (inputDelay <= 0) { control2 = Control2.Drone; droneShop.GetComponent <Animator>().SetBool("reveal", true); operatorShop.GetComponent <Animator>().SetBool("reveal", false); UpdateScaleOfItem(); // 현재 선택 중인 아이템을 크게 표시해주는 함수 SetDelay(0.25f); UpdateControlGuide(); // 조작 가이드 업데이트 SoundEffect.instance.audioSource.PlayOneShot(highlight); } return; } return; } }
public void OnPointerClick(PointerEventData eventData) { LoadingManager.LoadingScene("Scene_Lobby"); }
public void onClick() { LoadingManager.LoadScene("GameScene"); }
public void OnClickStage2Button() { LoadingManager.LoadScene("CLUE_Map2"); //SceneManager.LoadScene("CLUE_Map2"); Debug.Log("Stage2 Button Click"); }
public List <CsFacture> GetPrintObjects(string module) { try { if (!string.IsNullOrEmpty(Txt_DateDebut.Text) && !string.IsNullOrEmpty(Txt_DateFin.Text)) { //CultureInfo culture = CultureInfo.("fr-FR"); //DateTime _DateDebut = DateTime.Parse(Txt_DateDebut.Text.ToString(culture)); //DateTime _DateFin = DateTime.Parse(Txt_DateFin.Text.ToString(culture)); DateTime _DateDebut = DateTime.Parse(Txt_DateDebut.Text.ToString()); DateTime _DateFin = DateTime.Parse(Txt_DateFin.Text.ToString()); string reportName = string.Empty; if (Recapitulatif.IsChecked == true) { reportName = "NouvelAbonnementParPeriode"; } else if (Detail.IsChecked == true) { reportName = "NouvelAbonnementParPeriodeDetail"; } int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); Dictionary <string, string> parameters = new Dictionary <string, string>(); parameters.Add("pDateDebut", Txt_DateDebut.Text); parameters.Add("pDateFin", Txt_DateFin.Text); this.Parameters = parameters; ReportServiceClient service = new ReportServiceClient(Utility.Protocole(), Utility.EndPoint(module)); // string mois = (Cmb_month.SelectedIndex < 0) ? null : (Cmb_month.SelectedIndex + 1).ToString("00"); // le type "01" correspond a AffichageListeAbonnement List <ServiceReport.CsFacture> reportPrint = new List <CsFacture>(); service.ListeAbonnementsParPeriodeAsync(_DateDebut, _DateFin, 01, null, parameters); service.ListeAbonnementsParPeriodeCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { LoadingManager.EndLoading(loaderHandler); throw new Exception("Cannot display report"); } if (res.Result != null) { //Code en cas de succès reportPrint = res.Result; //Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary <string, string> param = new Dictionary <string, string>(); string key = Utility.getKey(); this.DefinedRDLC = reportName; param.Add("pDateDebut", _DateDebut.ToString()); param.Add("pDateFin", _DateFin.ToString()); //Effectue l'aperçcu avant imprèssion Utility.ActionDirectOrientation <ServicePrintings.CsFacture, Galatee.Silverlight.ServiceReport.CsFacture>(reportPrint, param, SessionObject.DefaultPrinter, "VisuReportNewElectricityServiceConnection", module, false); //Utility.ActionPreview<ServicePrintings.CsFacture, Galatee.Silverlight.ServiceReport.CsFacture>(reportPrint, param, reportName, module); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; return(reportPrint); } throw new Exception("Vous devez choisir des dates"); } catch (Exception ex) { throw ex; } }
public List <Galatee.Silverlight.ServiceReport.CsReglement> GetPrintObjects(string module) { try { string CollectionDate = (string.IsNullOrEmpty(Txt_DateDebut.Text)) ? null : Txt_DateDebut.Text; if (Txt_DateDebut.IsEnabled == false) { annee = (this.Txt_year.Text == string.Empty) ? null : this.Txt_year.Text; } else { annee = (Txt_DateDebut.SelectedDate != null) ? Txt_DateDebut.SelectedDate.Value.Year.ToString() : ""; } string reportName = "PassPaymentDetail"; this.DefinedRDLC = reportName; int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); List <ServiceReport.CsReglement> reportPrint = new List <ServiceReport.CsReglement>(); List <Galatee.Silverlight.ServiceReport.CsReglement> ligne = new List <Galatee.Silverlight.ServiceReport.CsReglement>(); //Doit tenir compte des mois coché GetAllSelectedCheckObjItem(); List <Galatee.Silverlight.ServiceCaisse.CsReglement> ListeDesFacture = new List <Galatee.Silverlight.ServiceCaisse.CsReglement>(); ReportServiceClient service = new ReportServiceClient(Utility.Protocole(), Utility.EndPoint(module)); //service.RPT_ETAT_ENCAISSEMENT_BY_COLLECTORAsync(listeDesCaissieresCochees, CollectionDate, annee, MoisChoisi, Edition, null, null); //service.RPT_ETAT_ENCAISSEMENT_BY_COLLECTORCompleted += (er, res) => //{ // try // { // if (res.Error != null || res.Cancelled) // { // LoadingManager.EndLoading(loaderHandler); // throw new Exception("Cannot display report"); // } // if (res.Result != null) // { // //Code en cas de succès // reportPrint = res.Result; // //Dictionary<string, string> param = new Dictionary<string, string>(); // Dictionary<string, string> param = null; // string key = Utility.getKey(); // //Effectue l'aperçcu avant imprèssion // Utility.ActionPreview<ServicePrintings.CsReglement, Galatee.Silverlight.ServiceReport.CsReglement>(reportPrint, param, "CurrentPaymentsDetails", module); // } // } // catch (Exception ex) // { // MessageBox.Show(ex.Message); // } // finally // { // LoadingManager.EndLoading(loaderHandler); // } //}; return(reportPrint); //return null; } catch (Exception ex) { throw ex; } }
private void CancelButton_Click(object sender, RoutedEventArgs e) { LoadingManager.EndLoading(handler); this.DialogResult = false; }
public void LoadLevel(int level) { LoadingManager.LoadLevel(level); }
private void SaveCampagne() { if (string.IsNullOrWhiteSpace(txtcampagne.Text) || Cbo_Centre.SelectedItem == null || dtpdatedebut.SelectedDate == null || dtpdatefinprevu.SelectedDate == null) { Message.Show("Tous les champs son obligatoire", "Notification"); } else { RecouvrementServiceClient service = new RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); handler = LoadingManager.BeginLoading("Savegarde des données ..."); CsCampagnesBTAAccessiblesParLUO CampBAT = new CsCampagnesBTAAccessiblesParLUO { //Campagne_ID=Guid.Parse("6F9619FF-8B86-D011-B42D-00C04FC964FA"), Campagne_ID = Guid.NewGuid(), CodeCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).CODE.ToString(), DateCreation = dtpdatedreation.SelectedDate.Value, DateDebutControles = dtpdatedebut.SelectedDate.Value, DateFinPrevue = dtpdatefinprevu.SelectedDate.Value, DateModification = DateTime.UtcNow.Date, Libelle_Campagne = txtcampagne.Text, MatriculeAgentCreation = UserConnecte.matricule, MatriculeAgentDerniereModification = UserConnecte.matricule, NbreElements = 0, Statut_ID = 1, fk_idCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).PK_ID }; service.InsertCampagneBTAAsync(CampBAT); service.InsertCampagneBTACompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else { if (res.Result != false) { Message.Show("L'enregistrement c'est bien passé", "Notification"); //CsTBCAMPAGNECONTROLEBTA camp = new CsTBCAMPAGNECONTROLEBTA //{ // CAMPAGNE_ID = CampBAT.Campagne_ID, // CODECENTRE = int.Parse(CampBAT.CodeCentre), // CODEEXPLOITATION = CampBAT.CodeCentre, // DATECREATION = CampBAT.DateCreation, // DATEDEBUTCONTROLES = CampBAT.DateDebutControles, // DATEFINPREVUE = CampBAT.DateFinPrevue, // DATEMODIFICATION = CampBAT.DateModification, // LIBELLE_CAMPAGNE = CampBAT.Libelle_Campagne, // LIBELLECENTRE = ((CsCentre)cbxexploitation.SelectedItem).LIBELLE, // LIBELLEEXPLOITATION = ((CsCentre)cbxexploitation.SelectedItem).LIBELLE, // LISTEBRANCHEMENT = new List<CsBrt>(), // LISTELOT = new List<CsTBLOTDECONTROLEBTA>(), // MATRICULEAGENTCREATION = CampBAT.MatriculeAgentCreation, // MATRICULEAGENTDERNIEREMODIFICATION = CampBAT.MatriculeAgentDerniereModification, // METHODE = new CsREFMETHODEDEDETECTIONCLIENTSBTA(), // NBREELEMENTS = 0, // NBRLOTS = 0, // PERIODE = string.Empty, // POULATIONNONAFFECTES = 0, // STATUT = string.Empty, // STATUT_ID = int.MinValue //}; //SessionObject.campagne.Add(camp); } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } }
public void LoadClientEligible() { string CodeTypeClient = ""; string CodeTypeTarif = ""; string CodeTypeCompteur = ""; string CodeAgentZone = ""; string CodeGroupe = ""; string MoisDepart = ""; string CodeCentre = ""; string CodeMethode = ""; int FkiCentre = 0; try { if (cbxmethrech.SelectedItem != null) { CodeMethode = ((Galatee.Silverlight.ServiceRecouvrement.CsRefMethodesDeDetectionClientsBTA)cbxmethrech.SelectedItem).Methode_ID.ToString(); } else { Message.Show("Veuillez choisir une méthode de détection", "Info"); return; } if (Cbo_Centre.SelectedItem != null) { CodeCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).CODE; FkiCentre = ((Galatee.Silverlight.ServiceAccueil.CsCentre)Cbo_Centre.SelectedItem).PK_ID; } else { Message.Show("Veuillez choisir un centre", "Info"); return; } if (cbxtypeclient.SelectedItem != null) { CodeTypeClient = ((Galatee.Silverlight.ServiceAccueil.CsCategorieClient)cbxtypeclient.SelectedItem).CODE.ToString(); } if (cbxtarif.SelectedItem != null) { CodeTypeTarif = ((Galatee.Silverlight.ServiceRecouvrement.CsTypeTarif)cbxtarif.SelectedItem).PK_ID.ToString(); } if (cbxagetzone.SelectedItem != null) { CodeAgentZone = ((Galatee.Silverlight.ServiceRecouvrement.CsReleveur)cbxagetzone.SelectedItem).MATRICULE; } if (cbxcompteur.SelectedItem != null) { CodeTypeCompteur = ((Galatee.Silverlight.ServiceRecouvrement.CsTcompteur)cbxcompteur.SelectedItem).PK_ID.ToString(); } #region Sylla 08/07/2016 if (cbxmethrech.SelectedItem != null) { var methrech = (Galatee.Silverlight.ServiceRecouvrement.CsRefMethodesDeDetectionClientsBTA)cbxmethrech.SelectedItem; //Si la méthode choisi est la methode de comparaison sur deux période if (methrech.Libele_Methode.Trim() == "Comparaison sur deux périodes".Trim()) { if (string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text) || string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text)) { Message.ShowWarning("Veillez saisir les deux périodes à comparer", "Avertissement"); return; } } else //Si la méthode choisi est la methode de comparaison sur plage de période if (methrech.Libele_Methode.Trim() == "Comparaison sur plage périodes".Trim()) { if (string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text) || string.IsNullOrWhiteSpace(txt_comparaison_periode1.Text)) { Message.ShowWarning(" Veillez saisir la période de debut et de fin ", "Avertissement"); return; } } else //Si la méthode choisi est la methode de Recurence des cas if (methrech.Libele_Methode.Trim() == "Recurence des cas".Trim()) { if (string.IsNullOrWhiteSpace(txt_Code_Cas.Text) || 0 > NumUpD_Nombre_Recurence.Value || string.IsNullOrWhiteSpace(txt_Periode.Text)) { Message.ShowWarning(" Veillez choisir la période de départ, un cas et le nombre de recurence ", "Avertissement"); return; } MoisDepart = this.txt_Periode.Text; } else { if (!string.IsNullOrEmpty(txt_Periode.Text)) { MoisDepart = this.txt_Periode.Text; } else { Message.Show("Veuillez choisir la periode départ", "Info"); return; } } } #endregion //RpntServiceClient Service = new RpntServiceClient(); Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient service = new Galatee.Silverlight.ServiceRecouvrement.RecouvrementServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Recouvrement")); int handler = LoadingManager.BeginLoading("Recuperation des données ..."); service.GetClientEligibleAsync(CodeMethode, FkiCentre, CodeTypeClient, CodeTypeTarif, CodeTypeCompteur, CodeAgentZone, CodeGroupe, MoisDepart, txt_comparaison_periode1.Text, txt_comparaison_periode2.Text, txt_Code_Cas.Text, NumUpD_Nombre_Recurence.Value, NumUpD_Pourcentatge.Value); service.GetClientEligibleCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { Message.Show("Erreur dans le traitement des méthode de dectection : " + res.Error.InnerException.ToString(), "Erreur"); } else if (res.Result != null) { foreach (var item in res.Result) { ListeClientEligible.Add(item); } dgClientEligible.ItemsSource = null; dgClientEligible.ItemsSource = ListeClientEligible; } else { Message.Show("Une erreur s'est produite, veuillez consultez le journal des erreurs", "Erreur"); } LoadingManager.EndLoading(handler); } catch (Exception ex) { throw ex; } }; } catch (Exception ex) { Message.Show(ex.Message, "Erreur"); } }
private void SetData() { if (null != _lsEtapes) { cmbEtapeConditionVrai.DisplayMemberPath = "NOM"; cmbEtapeConditionVrai.SelectedValuePath = "PK_ID"; cmbEtapeConditionVrai.ItemsSource = _lsEtapes; cmbGroupeValidation.DisplayMemberPath = "GROUPENAME"; cmbGroupeValidation.SelectedValuePath = "PK_ID"; cmbGroupeValidation.ItemsSource = GroupeValidation; } if (_conditionAction) { //Définition d'une condition d'action Title = "Définition d'une condition d'action"; cmbGroupeValidation.Visibility = System.Windows.Visibility.Collapsed; cmbEtapeConditionVrai.Visibility = System.Windows.Visibility.Collapsed; lblEtape.Visibility = System.Windows.Visibility.Collapsed; lblGroupe.Visibility = System.Windows.Visibility.Collapsed; } cmbGroupeValidation.Visibility = System.Windows.Visibility.Collapsed; cmbOperateur.Items.Clear(); foreach (var str in Operateurs) { cmbOperateur.Items.Add(str); } //Affichage des colonnes int back = LoadingManager.BeginLoading("Chargement des données ..."); ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage")); client.GetColumnsOfWorkingTableCompleted += (clmnsender, args) => { if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.Show(error, "Définition Condition"); return; } if (args.Result == null) { Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage); return; } cmbColonne.Items.Clear(); if (args.Result != null) { _LesColonnes = args.Result.ToArray(); } _LesColonnes.ToList().ForEach((string str) => { cmbColonne.Items.Add(str); }); LoadingManager.EndLoading(back); }; client.GetColumnsOfWorkingTableAsync((null != TableTravailConcernée) ? TableTravailConcernée.TABLE_NAME : string.Empty); }
void Awake() { _instance = this; InitConfig(); }
void Start() { if(instance == null){ instance = this; }else{ Object.Destroy(this.gameObject); } DontDestroyOnLoad(transform.gameObject); }