public UcMonnaie(CsMonnaie pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var Monnaie = new CsMonnaie(); if (pObject != null) ObjetSelectionnee = Utility.ParseObject(Monnaie, pObject as CsMonnaie); ModeExecution = pExecMode; dataGrid = pGrid; RemplirListeDesCentreExistant(); RemplirListeSupport(); if (dataGrid != null) donnesDatagrid = dataGrid.ItemsSource as ObservableCollection<CsMonnaie>; if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.VALEUR.Value.ToString("N2") ?? string.Empty; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty; btnOk.IsEnabled = false; //Txt_Code.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot,false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Monnaie); } }
public CwCasReleveIndex(CsCasind pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); if (pObject != null) { ObjetSelectionnee = pObject; } ModeExecution = pExecMode; dataGrid = pGrid; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCasind>; } this.CboEnqueteNonConfirmee.ItemsSource = this.ConstituerListeGroupeBoxFacturation(); this.CboEnqueteNonConfirmee.DisplayMemberPath = "LIBELLE"; this.CboEnqueteNonConfirmee.SelectedValuePath = "CODE"; this.CboSansEnqueteOuConfirmee.ItemsSource = this.ConstituerListeGroupeBoxFacturation(); this.CboSansEnqueteOuConfirmee.DisplayMemberPath = "LIBELLE"; this.CboSansEnqueteOuConfirmee.SelectedValuePath = "CODE"; this.CboIndex.ItemsSource = this.ConstituerListeGroupeBoxSaisie(); this.CboIndex.DisplayMemberPath = "LIBELLE"; this.CboIndex.SelectedValuePath = "CODE"; this.CboCompteur.ItemsSource = this.ConstituerListeGroupeBoxSaisie(); this.CboCompteur.DisplayMemberPath = "LIBELLE"; this.CboCompteur.SelectedValuePath = "CODE"; this.CboConsommation.ItemsSource = this.ConstituerListeGroupeBoxSaisie(); this.CboConsommation.DisplayMemberPath = "LIBELLE"; this.CboConsommation.SelectedValuePath = "CODE"; RemplirListeDesCentreExistant(ObjetSelectionnee); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { RemplirComboInformationComplementaire(ObjetSelectionnee); ChargerDonnees(ObjetSelectionnee); OKButton.IsEnabled = false; //TxtCas.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Parametrage); } }
public UcSaisiCompteursMT(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var CompteurBt = new CsCompteurBta(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta); } ModeExecution = pExecMode; dataGrid = pGrid; RemplirListeCmbDesEtatCompteursExistant(); ListeScelleExistant(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } //VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public UcWKFOperation(CsOperation _objCsOp, SessionObject.ExecMode execMode, DataGrid pGrid) { try { InitializeComponent(); dataGrid = pGrid; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsOperation>; } ObjetSelectionne = _objCsOp; _execMode = execMode; if (_execMode == SessionObject.ExecMode.Modification || _execMode == SessionObject.ExecMode.Consultation) { GetDefaultData(); if (_execMode == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } } ShowDetailsOperation(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.FenetreOperation); } }
public UcRegCli(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new CsRegCli(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsRegCli); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRegCli>; } InitialisationControle(); this.Txt_Regroupement.MaxLength = SessionObject.Enumere.TailleCodeRegroupement; if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.RegroupementClient); } }
public UcRegExo(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new CsRegExo(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsRegExo); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRegExo>; } RemplirListeDeroulante(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Exoneration); } }
public ActionResult GetPayResult(AllInOne oPayment, string OrderKey = "") { try { string MyAppDomain = ConfigurationManager.AppSettings["MyAppDomain"]; List <string> enErrors = new List <string>(); Hashtable htFeedback = null; oPayment.HashKey = ConfigurationManager.AppSettings["HashKey"]; oPayment.HashIV = ConfigurationManager.AppSettings["HashIV"]; enErrors.AddRange(oPayment.CheckOutFeedback(ref htFeedback)); if (enErrors.Count() == 0) { // 將 KEY 加密 byte[] keyBytes = Encoding.UTF8.GetBytes(OrderKey + string.Join("", OrderKey.Reverse())); string EncryptedKey = Convert.ToBase64String(keyBytes); using (var md5 = MD5.Create()) { var result = md5.ComputeHash(Encoding.ASCII.GetBytes(EncryptedKey)); EncryptedKey = BitConverter.ToString(result); } return(Redirect($"{MyAppDomain}/OrderForm/CheckPayResult/?OrderKey={EncryptedKey}&PaySuccess=true")); } else { return(Redirect($"{MyAppDomain}/OrderForm/CheckPayResult/?PaySuccess=false")); } } catch (Exception e) { return(Content($"發生錯誤{e},請將錯誤訊息截圖並寄給網站的管理員!")); } }
public UcWKFGroupeValidation(KeyValuePair <CsGroupeValidation, List <CsRHabilitationGrouveValidation> > lGroupeValidation, SessionObject.ExecMode exeMode, DataGrid dtGrid) { try { InitializeComponent(); dataGrid = dtGrid; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsGroupeValidation>; } Translate(); leGroupe = lGroupeValidation; _execMode = exeMode; ShowDataDetail(); if (_execMode == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } //Affichage des détails } catch (Exception ex) { Message.Show(ex.Message, Galatee.Silverlight.Resources.Langue.errorTitle); } }
public UcAffectationCompteur(Galatee.Silverlight.ServiceScelles.CsRemiseScelles pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); //Translate(); var margaVirtuelle = new Galatee.Silverlight.ServiceAccueil.CsCompteurBta(); if (pObject != null) { // ObjetSelectionnee = Utility.ParseObject(Remise, pObject as CsCompteurBta); ModeExecution = pExecMode; } dataGrid = pGrid; //RemplirListeCmbDeMotifsExistant(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); // btn_ajout.IsEnabled = true; } //VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public UcRemisesScelles(CsRemiseScelles pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); //Translate(); var Remise = new CsRemiseScelles(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(Remise, pObject as CsRemiseScelles); } ModeExecution = pExecMode; dataGrid = pGrid; RemplirListeCmbDeMotifsExistant(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); // btn_ajout.IsEnabled = true; } chb_SaisiNombreScelleSouhaite.Visibility = System.Windows.Visibility.Collapsed; txt_NombreScellesSouhaite.Visibility = System.Windows.Visibility.Collapsed; //VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public FrmImportFichier(aImportFichier codeimport, SessionObject.ExecMode pExecMode) { InitializeComponent(); ChargeInformation(codeimport.CODE); ModeExecution = pExecMode; if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } }
static void Main(string[] args) { TestRadios aRadio = new Radio(); aRadio anotherRadio = new aRadio(); AllInOne anAllInOne = new AllInOne(); List<IRadio> iradioList = new List<IRadio>) aRadio, anotherAllInOne, anotherRadio, anAllInOne };
public UcScelleCompteurMt(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var CompteurBt = new CsCompteurBta(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta); } this.txt_NumCpteur.MaxLength = 20; this.txt_ANNEEFAB.MaxLength = 4; this.txt_Cadran.MaxLength = 1; this.txt_Cadran.Text = "6"; ModeExecution = pExecMode; dataGrid = pGrid; // dtgrdlReceptionScelle.ItemsSource = donnesDatagrid; RemplirListeCmbDesEtatCompteursExistant(); RemplirListeCmbDesModelesMarqueExistant(); ChargerProduit(); //if (dataGrid != null) // donnesDatagrid = dataGrid.ItemsSource as ObservableCollection<CsLotMagasinGeneral>; if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { List <CsRefEtatCompteur> lstetat = (List <CsRefEtatCompteur>) this.Cbo_Etat_cmpt.ItemsSource; if (lstetat != null) { Cbo_Etat_cmpt.SelectedItem = lstetat.FirstOrDefault(t => t.EtatCompteur_ID == ObjetSelectionnee.EtatCompteur_ID); } List <Galatee.Silverlight.ServiceAccueil.CsMarqueCompteur> lstMaqmMdt = ListdesModelesfonctMarq; if (lstMaqmMdt != null) { Cbo_Marque.SelectedItem = ObjetSelectionnee.LIBELLEMARQUE; } txt_ANNEEFAB.Text = ObjetSelectionnee.ANNEEFAB; txt_NumCpteur.Text = ObjetSelectionnee.Numero_Compteur; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } //VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public UcCentre(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var centre = new CsCentre(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(centre, pObjects[0] as CsCentre); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCentre>; } RemplirSite(); RemplirTypeCentre(); RemplirListeProduit(); RemplirNiveautarif(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.CODE ?? string.Empty; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty; Txt_Adresse.Text = ObjetSelectionnee.ADRESSE ?? string.Empty; btnOk.IsEnabled = false; Cbo_Produit.ItemsSource = null; Cbo_Produit.ItemsSource = ObjetSelectionnee.LESPRODUITSDUSITE; Cbo_Produit.SelectedValuePath = "LIBELLE"; dtg_Produit.ItemsSource = null; dtg_Produit.ItemsSource = ObjetSelectionnee.LESPRODUITSDUSITE; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { ObjetSelectionnee = new CsCentre(); ObjetSelectionnee.LESPRODUITSDUSITE = new List <CsProduit>(); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Centre); } }
protected void Page_Load(object sender, EventArgs e) { List <string> enErrors = new List <string>(); string szFilePath = "D:\\test\\test.txt";//需指定路徑及檔名 try { using (AllInOne oPayment = new AllInOne()) { /* 服務參數 */ oPayment.ServiceMethod = HttpMethod.ServerPOST; //介接服務時,呼叫 API 的方法 oPayment.ServiceURL = "https://vendor-stage.ecpay.com.tw/PaymentMedia/TradeNoAio"; //要呼叫介接服務的網址 oPayment.HashKey = "5294y06JbISpM5x9"; //ECPay 提供的 HashKey oPayment.HashIV = "v77hoKGq4kWxNNIS"; //ECPay 提供的 HashIV oPayment.MerchantID = "2000132"; //ECPay 提供的廠商編號 /* 基本參數 */ oPayment.TradeFile.DateType = TradeDateType.Order; //日期類別 oPayment.TradeFile.BeginDate = "2016-01-17"; //開始日期 oPayment.TradeFile.EndDate = "2016-11-18"; //結束日期 oPayment.TradeFile.PaymentType = PaymentMethod.ALL; //付款方式 oPayment.TradeFile.PlatformStatus = PlatformState.ALL; //訂單類型 oPayment.TradeFile.PaymentStatus = PaymentState.ALL; //付款狀態 oPayment.TradeFile.AllocateStatus = AllocateState.ALL; //撥款狀態 oPayment.TradeFile.NewFormatedMedia = false; //特約合作平台商代號 enErrors.AddRange(oPayment.TradeNoAio(szFilePath)); } if (enErrors.Count() == 0) { // 其他資料處理。 Response.Write("程式執行成功!<br/>對帳媒體檔請至" + szFilePath + "查看。"); } else { // 其他資料處理。 Response.Write("Error"); } } catch (Exception ex) { // 例外錯誤處理。 enErrors.Add(ex.Message); } finally { // 顯示錯誤訊息。 if (enErrors.Count() > 0) { string szErrorMessage = String.Join("\\r\\n", enErrors); } } }
public string ProcessPayment() { List <string> enErrors = new List <string>(); string szHtml = String.Empty; try { using (AllInOne oPayment = new AllInOne()) { /* 服務參數 */ oPayment.ServiceMethod = HttpMethod.HttpPOST; oPayment.ServiceURL = "https://payment-stage.allpay.com.tw/Cashier/AioCheckOut/V2"; oPayment.HashKey = "5294y06JbISpM5x9"; oPayment.HashIV = "v77hoKGq4kWxNNIS"; oPayment.MerchantID = "2000132"; /* 基本參數 */ string hostname = this.Request.Url.Authority; oPayment.Send.ReturnURL = $"http://{hostname}/Pay/AllPayPayment"; oPayment.Send.MerchantTradeNo = DateTime.Now.ToString("yyyyMMddHHmmss"); oPayment.Send.MerchantTradeDate = DateTime.Now; oPayment.Send.TotalAmount = 1; oPayment.Send.TradeDesc = "測試金流的描述 ABC"; oPayment.Send.Items.Add(new Item() { Name = "iPhone6 Plus" , Price = 99 , Currency = "元" , Quantity = 1 //, Unit = "組" //, TaxType = TaxationType.Taxable } ); /* 產生訂單 */ enErrors.AddRange(oPayment.CheckOut()); /* 產生產生訂單 Html Code 的方法 */ enErrors.AddRange(oPayment.CheckOutString(ref szHtml)); } } catch (Exception ex) { // 例外錯誤處理。 enErrors.Add(ex.Message); } finally { // 顯示錯誤訊息。 if (enErrors.Count() > 0) { szHtml = String.Join("\\r\\n", enErrors); } } return(szHtml); }
public UcCoperDemande(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new CsCoutDemande(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsCoutDemande); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; ChargerDonneeDuSite(); ChargerProduit(); RemplirListeDesCOPERExistant(); RemplirListeDesTAXIExistant(); RemplirListeDesTDEMExistant(); ChargerDiametreCompteur(); ChargerCategorie(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCoutDemande>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Montant.Text = ObjetSelectionnee.MONTANT.ToString(); CboTAXE.SelectedItem = ObjetSelectionnee.TAXE; CboProduit.SelectedItem = ObjetSelectionnee.PRODUIT; if (ObjetSelectionnee.AUTOMATIQUE == true) { CheckAuto.IsChecked = true; } if (ObjetSelectionnee.OBLIGATOIRE == true) { CheckObl.IsChecked = true; } } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.Show(ex.Message, Languages.CoperDemande); } }
/// <summary> /// Inititalise tous les controles de l'IHM pour une nouvelle /// saisie de données /// </summary> /// void CleanIHM() { try { for (int i = 1; i < NumericUpDown.Value; i++) { TextBox amounts = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtAmount" + i); TextBox date = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtDate" + i); amounts.Text = string.Empty; date.Text = string.Empty; } prgBar.Visibility = System.Windows.Visibility.Collapsed; txtClientName.Text = string.Empty; txtReference.Text = string.Empty; txtClientAdresse.Text = string.Empty; //txtDue.Text = string.Empty; if (listFacture != null && listFacture.Count > 0) { listFacture.Clear(); } if (listeDateMoratoire != null && listeDateMoratoire.Count > 0) { listeDateMoratoire.Clear(); } if (listeAmountMoratoire != null && listeAmountMoratoire.Count > 0) { listeAmountMoratoire.Clear(); } rdbMonth.IsChecked = true; frequenceMoratoire = 1; txtSoldeDue.Text = string.Empty; if (listFacture != null && listFacture.Count > 0) { listFacture.Clear(); } if (lstFactureDeMoratoire != null && lstFactureDeMoratoire.Count > 0) { lstFactureDeMoratoire.Clear(); } } catch (Exception ex) { throw ex; } }
public UcFourniture(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new ObjFOURNITURE(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as ObjFOURNITURE); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; RemplirProduit(); RemplirListeDesTDEMExistant(); RemplireMateriel(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <ObjFOURNITURE>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_CoutFournituure.Text = Convert.ToString(ObjetSelectionnee.COUTUNITAIRE_FOURNITURE); Check_Add.IsChecked = ObjetSelectionnee.ISADDITIONAL; Check_Default.IsChecked = ObjetSelectionnee.ISDEFAULT; txt_Quatite.Text = Convert.ToString(ObjetSelectionnee.QUANTITY); } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { ObjetSelectionnee = null; Txt_CoutFournituure.Text = ""; Txt_CoutPose.Text = ""; Check_Add.IsChecked = false; Check_Default.IsChecked = false; txt_Quatite.Text = " "; CboProduit.SelectedIndex = 0; } } catch (Exception ex) { Message.Show(ex.Message, Languages.Diametrecompteur); } }
public UcSaisiCompteur(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var CompteurBt = new CsCompteurBta(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta); } ModeExecution = pExecMode; dataGrid = pGrid; RemplirListeCmbDesEtatCompteursExistant(); RemplirListeCmbDesModelesMarqueExistant(); ChargerDiametreCompteur(); ChargerTypeCompteur(); ListeScelleExistant(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Cbo_Diametre.SelectedItem = SessionObject.LstCalibreCompteur.FirstOrDefault(t => t.PK_ID == ObjetSelectionnee.FK_IDCALIBRECOMPTEUR); Cbo_typeCmpt.SelectedItem = SessionObject.LstTypeCompteur.FirstOrDefault(t => t.PK_ID == ObjetSelectionnee.FK_IDTYPECOMPTEUR); List <CsRefEtatCompteur> lstetat = (List <CsRefEtatCompteur>) this.Cbo_Etat_cmpt.ItemsSource; if (lstetat != null) { Cbo_Etat_cmpt.SelectedItem = lstetat.FirstOrDefault(t => t.EtatCompteur_ID == ObjetSelectionnee.EtatCompteur_ID); } List <CsMarque_Modele> lstMaqmMdt = ListdesModelesfonctMarq; if (lstMaqmMdt != null) { Cbo_Marque.SelectedItem = ObjetSelectionnee.LIBELLEMARQUE; Cbo_Modele.SelectedItem = lstMaqmMdt.FirstOrDefault(t => t.MARQUE_ID == ObjetSelectionnee.FK_IDMARQUECOMPTEUR); } txt_ANNEEFAB.Text = ObjetSelectionnee.ANNEEFAB; txt_NumCpteur.Text = ObjetSelectionnee.Numero_Compteur; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } //VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Commune); } }
public UcRedevance(CsRedevance pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var Redevance = new CsRedevance(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(Redevance, pObject as CsRedevance); } ModeExecution = pExecMode; dataGrid = pGrid; RemplirListeDesCentreExistant(); RemplirProduit(); RemplirNatureClient(); RemplirLienRedevance(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRedevance>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Redevance.Text = ObjetSelectionnee.NUMREDEVANCE ?? string.Empty; TxtTranche.Text = ObjetSelectionnee.TRANCHE ?? string.Empty; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty; TxtParametre1.Text = ObjetSelectionnee.PARAM1 ?? string.Empty; TxtParametre2.Text = ObjetSelectionnee.PARAM2 ?? string.Empty; TxtParametre3.Text = ObjetSelectionnee.PARAM3 ?? string.Empty; TxtParametre4.Text = ObjetSelectionnee.PARAM4 ?? string.Empty; TxtParametre5.Text = ObjetSelectionnee.PARAM5 ?? string.Empty; TxtParametre6.Text = ObjetSelectionnee.PARAM6 ?? string.Empty; ChkEditable.IsChecked = ObjetSelectionnee.EDITEE == "1" ? true : false; ChkExoneree.IsChecked = ObjetSelectionnee.EXONERATION == "1" ? true : false; btnOk.IsEnabled = false; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Redevance); } }
void FillDetailData(List <ServiceRecouvrement.CsDetailMoratoire> l) { try { this.NumericUpDown.Value = l.Count; //for (int j = 0; j <= 10; j++) //{ // j++; // TextBox amounts = AllInOne.FindControl<TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtAmount" + j); // TextBox dateBox = AllInOne.FindControl<TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtDate" + j); // amounts.Text = string.Empty; // dateBox.Text = string.Empty; //} soldeFactureSelect = l.Sum(t => t.MONTANT).Value; int i = 0; List <ServiceRecouvrement.CsDetailMoratoire> listeIsCret = new List <ServiceRecouvrement.CsDetailMoratoire>(); foreach (ServiceRecouvrement.CsDetailMoratoire moratoires in l) { // fill les données des échéances i++; TextBox amounts = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtAmount" + i); TextBox dateBox = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtDate" + i); if (!string.IsNullOrEmpty(moratoires.CRET)) { listeIsCret.Add(moratoires); amounts.Text = moratoires.MONTANT == null ? string.Empty : moratoires.MONTANT.Value.ToString(SessionObject.FormatMontant); dateBox.Text = (moratoires.EXIGIBILITE == null ? string.Empty : moratoires.EXIGIBILITE.Value.ToString("d")); } else { // listeIsCret.Add(moratoires); amounts.Text = moratoires.MONTANT == null ? string.Empty : moratoires.MONTANT.Value.ToString(SessionObject.FormatMontant); dateBox.Text = (moratoires.EXIGIBILITE == null ? string.Empty : moratoires.EXIGIBILITE.Value.ToString("d")); } } Decimal fraisFacture = listeIsCret.Sum(p => p.FRAISDERETARD == null ? 0 : p.FRAISDERETARD.Value); Decimal montantFacture = listeIsCret.Sum(p => p.MONTANT == null ? 0 : p.MONTANT.Value); amountselected = txtSoldeDue.Text = (montantFacture - fraisFacture).ToString(SessionObject.FormatMontant); nombreEchaeance = listeIsCret.Count.ToString(); } catch (Exception ex) { throw ex; } }
/// <summary> /// Inititalise tous les controles de l'IHM pour une nouvelle /// saisie de données /// </summary> /// void CleanIHM() { try { for (int i = 1; i < 13; i++) { TextBox amounts = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtAmount" + i); TextBox date = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtDate" + i); TextBox charges = AllInOne.FindControl <TextBox>((UIElement)LayoutRoot, typeof(TextBox), "txtCharg" + i); //amounts.Text = string.Empty; //date.Text = string.Empty; //charges.Text = string.Empty; } prgBar.Visibility = System.Windows.Visibility.Collapsed; txtClientName.Text = string.Empty; txtClientAdresse.Text = string.Empty; //txtReference.Text = string.Empty; txtDue.Text = string.Empty; txtNoInstalmnt.Text = string.Empty; Cbo_ListeClient.ItemsSource = null; if (listeDateMoratoire != null) { listeDateMoratoire.Clear(); } if (listeAmountMoratoire != null) { listeAmountMoratoire.Clear(); } amountselected = string.Empty; if (lientFactureDUcLIENT != null) { lientFactureDUcLIENT.Clear(); } if (lientFactureDUcLIENTSplit != null) { lientFactureDUcLIENTSplit.Clear(); } } catch (Exception ex) { throw ex; } }
public UcSite(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var site = new CsSite(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(site, pObjects[0] as CsSite); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsSite>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Site.Text = ObjetSelectionnee.CODE ?? string.Empty; Txt_Serveur.Text = ObjetSelectionnee.SERVEUR ?? string.Empty; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty; Txt_Catalogue.Text = ObjetSelectionnee.CATALOGUE ?? string.Empty; Txt_Utilisateur.Text = ObjetSelectionnee.USERID ?? string.Empty; Txt_Pwd.Password = Security.Cryptage.Decrypt(ObjetSelectionnee.PWD) ?? string.Empty; Txt_ConfirmationPwd.Password = Security.Cryptage.Decrypt(ObjetSelectionnee.PWD) ?? string.Empty; Txt_Libelle.Focus(); btnOk.IsEnabled = false; //Txt_Site.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Site); } }
public UcRegExo() { try { InitializeComponent(); Translate(); if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.Exoneration); } }
public UcAppareils(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new CsAppareils(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsAppareils); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsAppareils>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_CodeAppareil.Text = Convert.ToString(ObjetSelectionnee.CodeAppareil); Txt_Designation.Text = ObjetSelectionnee.Designation; Txt_DETAILS.Text = ObjetSelectionnee.Details; txt_TpsUtil.Text = ObjetSelectionnee.TEMPSUTILISATION.ToString(); } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation) { Txt_CodeAppareil.Text = ""; Txt_Designation.Text = ""; Txt_DETAILS.Text = ""; txt_TpsUtil.Text = ""; } //VerifierSaisie(); } catch (Exception ex) { Message.Show(ex.Message, Languages.Appareils); } }
public UcDomBanc(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); var categorieClient = new CsDomBanc(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsDomBanc); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; RemplirListeDesBanques(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsDomBanc>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Banque.Text = ObjetSelectionnee.BANQUE ?? string.Empty; Txt_Guichet.Text = ObjetSelectionnee.GUICHET ?? string.Empty; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty; Txt_Compte.Text = ObjetSelectionnee.COMPTE ?? string.Empty; Txt_Comptabilite.Text = ObjetSelectionnee.COMPTA ?? string.Empty; btnOk.IsEnabled = false; //Txt_Banque.IsReadOnly = true; //Txt_Guichet.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.DomiciliationBancaire); } }
public UcDiametrecompteur(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); //Translate(); var categorieClient = new CsDiacomp(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsDiacomp); } ModeExecution = pExecMode[0]; dataGrid = pGrid[0]; RemplirProduit(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsDiacomp>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.CODE; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE; Txt_BNI.Text = Convert.ToString(ObjetSelectionnee.BNI); Txt_BNS.Text = Convert.ToString(ObjetSelectionnee.BNS); Txt_CFI.Text = Convert.ToString(ObjetSelectionnee.CFI); Txt_CFS.Text = Convert.ToString(ObjetSelectionnee.CFS); btnOk.IsEnabled = false; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.Show(ex.Message, Languages.Diametrecompteur); } }
public UcCategoriesClient(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid) { try { InitializeComponent(); Translate(); if (pExecMode != null) { ModeExecution = pExecMode[0]; } var categorieClient = new CsCategorieClient(); if (pObjects[0] != null) { ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsCategorieClient); } dataGrid = pGrid[0]; if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCategorieClient>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.CODE; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE; btnOk.IsEnabled = false; //Txt_Code.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, Languages.LibelleCategorieClient); } }
public UcSecteur(CsSecteur pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid) { try { InitializeComponent(); Translate(); var Secteur = new CsSecteur(); if (pObject != null) { ObjetSelectionnee = Utility.ParseObject(Secteur, pObject as CsSecteur); } ModeExecution = pExecMode; dataGrid = pGrid; //RemplirListeDesCentreExistant(); RemplirQuartier(); if (dataGrid != null) { donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsSecteur>; } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { if (ObjetSelectionnee != null) { Txt_Code.Text = ObjetSelectionnee.CODE; Txt_Libelle.Text = ObjetSelectionnee.LIBELLE; //CboQuartier.SelectedItem = SessionObject.LstQuartier.FirstOrDefault(a => a.PK_ID == ObjetSelectionnee.FK_IDQUARTIER); btnOk.IsEnabled = false; //Txt_Code.IsReadOnly = true; } } if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation) { AllInOne.ActivateControlsFromXaml(LayoutRoot, false); } VerifierSaisie(); } catch (Exception ex) { Message.ShowError(ex.Message, "Secteur"); } }