public void SupprimerRemboursement(Remboursement remboursement, Employe employe) { operationBLO = new OperationBLO(); remboursementBLO.Remove(remboursement); operationBLO.AjouterOperation(TypeOperation.Suppression, employe, remboursement.Credit.Client, new CompteClient("Indefini"), remboursement.Montant, "toto tata"); }
//-------------------------------------------------------------------- public int Insert(Remboursement pRemboursement) { string[] lsCols = null; string[] lsValues = null; this.FillArray(ref lsCols, ref lsValues, pRemboursement, true); return(DataBase.Insert("[tblRemboursement]", lsCols, lsValues)); }
void Refresh(Remboursement remb) { dgRemboursement.DataSource = remb.AllRemboursements(); //rowCount = dgRemboursement.Rows.Count; //rowCount = rowCount + 1; //dgRemboursement.Rows.Add(rowCount); }
void ActionBtnSave() { try { if (idRemboursement == 0) { MessageBox.Show("Vous devez cliquez d'abords sur la bouton nouvelle opération avant chaque enregistrement", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (idSemaine == 0) { MessageBox.Show("Selectionner d'abord la semaine à remboursser dans la liste de choix", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Remboursement remb = new Remboursement(); remb.Id = idRemboursement; remb.RefSemaine = idSemaine; remb.Enregistrer(remb); Refresh(new Remboursement()); nouveauBtn.Enabled = true; saveBtn.Enabled = false; } } catch (Exception ex) { MessageBox.Show("L'erreur suvant est survenue : " + ex.Message); } }
//--------------------------------------------------------------------- public int Update(Remboursement pRemboursement) { string[] lsCols = null; string[] lsValues = null; this.FillArray(ref lsCols, ref lsValues, pRemboursement, false); return(DataBase.UpdateID("tblRemboursement", lsCols, lsValues, pRemboursement.ID)); }
private void ArticleRuptures() { Articles art = new Articles(); Remboursement remb = new Remboursement(); lblRupture.Text = art.CountRuptureStock().ToString() + " Articles en rupture"; lblRuptSoon.Text = art.CountRuptureSoon().ToString() + " Articles"; lblRecouvrement.Text = remb.CountRemboursementToday().ToString() + " Recouvrements"; lblCredit.Text = remb.CountCredit().ToString() + " dettes"; lblPop.Text = art.CountArticlesPop().ToString() + " Articles"; lblDormant.Text = art.CountStockFixe().ToString() + " Articles"; }
public void PayerDette(Remboursement remboursement, Credit credit, double montant, Employe employe) { operationBLO = new OperationBLO(); creditBLO = new CreditBLO(); creditBLO.ReduireMontantCredit(credit, montant, employe); int index = remboursementBLO.IndexOf(remboursement); remboursement.StatutRemboursement = StatutRemboursement.Validé; remboursementBLO[index] = remboursement; operationBLO.AjouterOperation(TypeOperation.Ajout, employe, credit.Client, new CompteClient("Indefini"), montant, "toto tata"); }
public Request generateARequest() { int typeRequete = random.Next() % 9; Requete requete; ++nbRequetes; switch (typeRequete) { case 0: requete = new CertificatFortune(); break; case 1: requete = new Retrait(); break; case 2: requete = new Depot(); break; case 3: requete = new Remboursement(); break; case 4: requete = new Emprunt(); break; case 5: requete = new PayementSalaire(); break; case 6: requete = new MiroirDoubleSens(); break; case 7: requete = new OuvrirCompte(); break; case 8: requete = new TraiterBeuglantes(); break; default: break; } return(requete); }
public void ValiderRemboursement(Remboursement remboursement, Employe employe) { operationBLO = new OperationBLO(); creditBLO = new CreditBLO(); int index = remboursementBLO.IndexOf(remboursement); remboursement.StatutRemboursement = StatutRemboursement.Validé; remboursementBLO[index] = remboursement; operationBLO.AjouterOperation(TypeOperation.Validation, employe, remboursement.Credit.Client, new CompteClient("Indefini"), remboursement.Montant, "toto tata"); creditBLO.ReduireMontantCredit(remboursement.Credit, remboursement.Montant, employe); }
private void button2_Click(object sender, EventArgs e) { try { Remboursement cr = new Remboursement(); idRemb = cr.NewId(); codeTxt.Text = "REM00-" + idRemb; } catch (Exception ex) { MessageBox.Show("Lerreur suivant est survenue : " + ex.Message); } }
void ActionBtnNouveau() { try { Remboursement remb = new Remboursement(); idRemboursement = remb.Nouveau(); nouveauBtn.Enabled = false; saveBtn.Enabled = true; } catch (Exception ex) { MessageBox.Show("L'erreur suvant est survenue : " + ex.Message); } }
//-------------------------------------------------------------------- public Remboursement Find(Guid ID) { Remboursement lRemboursement = (Remboursement)AbstractFind(ID); if (Util.isNULL(lRemboursement)) { DataRow row = DataBase.SelectID(ID, "[tblRemboursement]"); if (Util.isNULL(row)) { return(null); } lRemboursement = this.FillFields(row); LoadedMap.Add(lRemboursement.ID, lRemboursement); } return(lRemboursement); }
//---------------------------------------------------------------------------------------- public int Delete(Remboursement pRemboursement) { int liErreur = int.MinValue; int liTemp; int liI = 0; liTemp = DataBase.DeleteID(pRemboursement.ID, "[tblRemboursement]"); if (liTemp == liErreur) { liI = liErreur; } if (liI != liErreur) { liI += liTemp; } return(liI); }
//--------------------------------------------------------------------- private void FillArray(ref string[] pCols, ref string[] pValues, Remboursement pRemboursement, bool pIsInsertID) { int liCpt = 0; int liNombre = 5 + 0; if (pIsInsertID) { pCols = new string[liNombre + 1]; pValues = new string[liNombre + 1]; pCols[liCpt] = "ID"; pValues[liCpt++] = "'" + pRemboursement.ID.ToString() + "'"; } else { pCols = new string[liNombre]; pValues = new string[liNombre]; } pCols[liCpt] = "Numéro"; pValues[liCpt++] = "'" + Util.DoubleQuote(pRemboursement.Numéro) + "'"; pCols[liCpt] = "DateTransaction"; pValues[liCpt++] = "'" + pRemboursement.DateTransaction.ToString() + "'"; pCols[liCpt] = "TypeTransaction"; pValues[liCpt++] = "'" + Util.DoubleQuote(pRemboursement.TypeTransaction) + "'"; pCols[liCpt] = "Prix"; pValues[liCpt++] = "'" + pRemboursement.Prix.ToString() + "'"; pCols[liCpt] = "MontantTaxe"; pValues[liCpt++] = "'" + pRemboursement.MontantTaxe.ToString() + "'"; }
void SaveDatas() { try { Remboursement remb = new Remboursement(); remb.Id = idRemb; remb.Code = codeTxt.Text; remb.Montant = Convert.ToDouble(montantTxt.Text); remb.Observation = observCombo.Text; remb.RefCredit = dn.retourId("Id", "Affichage_Details_Creance", "Client_Credit", creanceCombo.Text); remb.DateRemboursement = Convert.ToDateTime(dateTxt.Text); remb.Enregistrer(remb); MessageBox.Show("Enregistrement reussi"); } catch (Exception ex) { MessageBox.Show("L'erreur suivant est survenue : " + ex.Message); } }
//-------------------------------------------------------------------- private Remboursement FillFields(DataRow pDataRow) { Remboursement lRemboursement = new Remboursement(); lRemboursement.Numéro = (string)pDataRow["Numéro"]; lRemboursement.DateTransaction = (DateTime)pDataRow["DateTransaction"]; lRemboursement.TypeTransaction = (string)pDataRow["TypeTransaction"]; lRemboursement.Prix = (float)pDataRow["Prix"]; lRemboursement.MontantTaxe = (float)pDataRow["MontantTaxe"]; lRemboursement.ID = new Guid(pDataRow["ID"].ToString()); return(lRemboursement); }
private void ReceiveDatas(Remboursement remb) { dgRecouvr.DataSource = remb.AllRecouvrement(procedure); }
private void ajoutFrais_Click(object sender, EventArgs e) { Remboursement fRemboursement = new Remboursement(); }
void SelectDatas(Remboursement rem) { dgRembb.DataSource = rem.AllDPayement(); }
public new void valider(Remboursement remboursement) { model.addCoffre(requete.getSomme()); passerSuperieur(requete); occupe = false; }
void Search(Remboursement art) { dgRembb.DataSource = art.Research(serchTxt.Text); }