public List <CsCprofac> GetPrintObjects(string module) { try { //this.Parameters = new Dictionary<string, string>(); //this.Parameters.Add("pCoper", _LibelleCoper); int loaderHandler = LoadingManager.BeginLoading("Patienter ... "); string mois = (Cmb_month.SelectedIndex <= 0) ? null : Cmb_month.SelectedIndex.ToString("00"); //string categ = (Cmb_cat.SelectedValue == null) ? null : Cmb_cat.SelectedValue.ToString(); string categ = (Cmb_cat.SelectedIndex < 0) ? null : categories[Cmb_cat.SelectedIndex].CODE; //List<ServiceReport.CsCprofac> listprofac = new List<ServiceReport.CsCprofac>(); ReportServiceClient service = new ReportServiceClient(Utility.Protocole(), Utility.EndPoint(module)); List <ServiceReport.CsCprofac> reportPrint = new List <CsCprofac>(); service.SPX_CPROFAC_SEL_ELEC_CONSOAsync(Txt_year.Text, mois, categ, _Coper); service.SPX_CPROFAC_SEL_ELEC_CONSOCompleted += (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.CsCprofac, Galatee.Silverlight.ServiceReport.CsCprofac>(reportPrint, param, "CurrentPaymentsDetails", module); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; return(reportPrint); } catch (Exception ex) { throw ex; } }
private void SPX_RPT_SELECT_FACTURES_TOURNEE_DETAIL(List <string> Listcategorie, string TypeEdition, string ValueJour, string ValueMois, string ValueAnnee, Dictionary <string, string> listeParam) { int loaderHandler = LoadingManager.BeginLoading("Please Wait for catégorie detail ... "); ReportServiceClient service = new ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Report")); //List<ServiceReport.CsFacture> liste = service.SPX_RPT_AREAS_CATEGORY_DETAIL(categorie, TypeEdition, ValueJour, ValueMois, ValueAnnee, null, listeParam); List <ServiceReport.CsFacture> liste = new List <CsFacture>(); string key = Utility.getKey(); service.SPX_RPT_SELECT_FACTURES_TOURNEE_DETAILAsync(Listcategorie, TypeEdition, ValueJour, ValueMois, ValueAnnee, key, listeParam); service.SPX_RPT_SELECT_FACTURES_TOURNEE_DETAILCompleted += (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; } liste = res.Result; List <ServiceReport.CsFacture> reportPrint = new List <CsFacture>(); if (this.ddbSolde.SelectedValue != null && this.ddbSolde.SelectedValue.ToString() != string.Empty && this.txtMarge.Text != string.Empty) { reportPrint = ConstruireNouvelleListe(liste); } else { reportPrint.AddRange(liste); } listefinale.AddRange(reportPrint); this.DefinedRDLC = reportName; Utility.ActionPreview <ServicePrintings.CsFacture, ServiceReport.CsFacture>(listefinale, listeParam, this.DefinedRDLC, "Report"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; }
private void btnPrint_Click(object sender, RoutedEventArgs e) { var dictionaryParam = new Dictionary <string, string>(); try { dictionaryParam.Add("RptParam_CODE", Languages.Code.ToUpper()); dictionaryParam.Add("RptParam_Libelle", Languages.Libelle.ToUpper()); dictionaryParam.Add("RptParam_CFI", Languages.LibelleCFI.ToUpper()); dictionaryParam.Add("RptParam_CFS", Languages.LibelleCFS.ToUpper()); dictionaryParam.Add("RptParam_BNI", Languages.LibelleBNI.ToUpper()); dictionaryParam.Add("RptParam_BNS", Languages.LibelleBNS.ToUpper()); dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation); dictionaryParam.Add("RptParam_DateModification", Languages.DateModification); dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation); dictionaryParam.Add("RptParam_UserModification", Languages.UserModification); dictionaryParam.Add("RptParam_Title", Languages.ListeDiacomp.ToUpper()); if (DonnesDatagrid.Count == 0) { throw new Exception(Languages.AucuneDonneeAImprimer); } var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.Diametrecompteur, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question); messageBox.OnMessageBoxClosed += (_, result) => { if (messageBox.Result == MessageBoxResult.OK) { string key = Utility.getKey(); var service = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage")); service.EditerListeProduitCompleted += (snder, print) => { if (print.Cancelled || print.Error != null) { string error = print.Error.Message; Message.ShowError(error, Languages.LibelleProduit); } if (!print.Result) { Message.ShowError(Languages.ErreurImpressionDonnees, Languages.LibelleProduit); } //Utility.ActionImpressionDirect(SessionObject.CheminImpression, key, "Diametrecompteur", "Parametrage"); Utility.ActionPreview(key, string.Empty, "Diametrecompteur", "Parametrage"); }; service.EditerListeProduitAsync(key, dictionaryParam); } else { return; } }; messageBox.Show(); } catch (Exception ex) { Message.Show(ex.Message, Languages.Diametrecompteur); } }
public void GetPrintObjects(string module) { try { this.Parameters = new Dictionary <string, string>(); this.Parameters.Add("pCoper", _LibelleCoper); int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); //List<CsSales> reportPrint=new List<CsSales>(); List <ServiceReport.CsCprofac> listprofac = new List <ServiceReport.CsCprofac>(); ReportServiceClient service = new ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint((module))); string key = Utility.getKey(); service.QUANTITY_SOLD_BY_CATEGAsync(Txt_year.Text, _Coper, key, this.Parameters); service.QUANTITY_SOLD_BY_CATEGCompleted += (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; } ////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.CsSales>(null, "QuantitySoldByCategory", module, key); //Utility.ActionPreview<ServicePrintings.CsSales, Galatee.Silverlight.ServiceReport.CsSales>(reportPrint, param, "QuantitySoldByCategory", module); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; } catch (Exception ex) { throw ex; } }
private void Imprimer() { var dictionaryParam = new Dictionary <string, string>(); try { if (DonnesDatagrid.Count == 0) { throw new Exception(Languages.AucuneDonneeAImprimer); } dictionaryParam.Add("Rpt_Code", Languages.ColonneCode.ToUpper()); dictionaryParam.Add("RptParam_Libelle", Languages.ColonneLibelle.ToUpper()); dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation); dictionaryParam.Add("RptParam_DateModification", Languages.DateModification); dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation); dictionaryParam.Add("RptParam_UserModification", Languages.UserModification); dictionaryParam.Add("Rpt_ParamCentre", Languages.Centre.ToUpper()); dictionaryParam.Add("RptParam_Title", Languages.ListeCommune.ToUpper()); var w = new MessageBoxControl.MessageBoxChildWindow(Languages.Commune, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question); w.OnMessageBoxClosed += (_, result) => { if (w.Result == MessageBoxResult.OK) { var service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage")); string key = Utility.getKey(); service.EditerListeCommuneCompleted += (snder, print) => { if (print.Cancelled || print.Error != null) { Message.ShowError(print.Error.Message, Languages.Commune); return; } if (!print.Result) { Message.ShowError(Languages.ErreurImpressionDonnees, Languages.Commune); return; } //Utility.ActionImpressionDirectOrientation(SessionObject.CheminImpression, key, "Commune", "Parametrage", false); Utility.ActionPreview(key, string.Empty, "Commune", "Parametrage"); }; service.EditerListeCommuneAsync(key, dictionaryParam); } else { return; } }; w.Show(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public List <ServiceReport.CsConnexion> GetPrintObjects(string module) { try { ReportServiceClient service = new ReportServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint(module)); string mois = (Cmb_month.SelectedIndex < 0) ? null : (Cmb_month.SelectedIndex + 1).ToString("00"); List <ServiceReport.CsConnexion> reportPrint = new List <CsConnexion>(); int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); service.ObtenirWaterConnexionByPeriodeAsync(Txt_year.Text, mois); service.ObtenirWaterConnexionByPeriodeCompleted += (er, res) => { try { if (res.Error != null || res.Cancelled) { LoadingManager.EndLoading(loaderHandler); throw new Exception("Cannot display report"); } if (res.Result != null) { reportPrint = res.Result; Utility.ActionPreview <ServicePrintings.CsConnexion, Galatee.Silverlight.ServiceReport.CsConnexion>(reportPrint, null, "VisuReportElectricityServiceConnection", module); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; this.DefinedRDLC = "ConnexionWaterPie"; return(reportPrint); } catch (Exception ex) { throw ex; } }
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; } }
public List <CsDeclarationTVA> GetPrintObjects(string module) { try { string mois = string.Empty; if (this.ddbMois.SelectedItem != null) { if (string.IsNullOrEmpty(ddbMois.SelectedValue.ToString())) { mois = null; } else { mois = listeMois.FirstOrDefault(t => t.ANNMOIS == ddbMois.SelectedValue).MOISCOMPTABLE; } } //if (!string.IsNullOrEmpty(mois)) //{ string Annee = (string.IsNullOrEmpty(this.txtYear.Text)) ? null : this.txtYear.Text; string reportName = "DeclarationTVA"; this.DefinedRDLC = reportName; int loaderHandler = LoadingManager.BeginLoading("Please Wait for pass payment ... "); ReportServiceClient service = new ReportServiceClient(Utility.Protocole(), Utility.EndPoint("Report")); List <CsDeclarationTVA> liste = new List <CsDeclarationTVA>();; service.RPT_DECLARATION_TVAAsync(mois, Annee, null, null); service.RPT_DECLARATION_TVACompleted += (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 liste = 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.CsDeclarationTVA, CsDeclarationTVA>(liste, param, "DeclarationTVA", "Report"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { LoadingManager.EndLoading(loaderHandler); } }; return(liste); } catch (Exception) { throw; } }