Exemple #1
0
        public ActionResult Add(Model.yh yh)
        {
            ViewModels.Message rsp = new ViewModels.Message();
            if (yh == null)
            {
                rsp.sno = 0;
                rsp.msg = "未输入用户信息";
            }

            else
            {
                yh.yhmm = Utils.MD5(yh.yhmm);
                if (dal.Add(yh) > 0)
                {
                    rsp.sno = 1;
                    rsp.msg = "成功";
                }
                else
                {
                    rsp.sno = 0;
                    rsp.msg = "数据操作失败";
                }
            }
            return(Json(rsp, JsonRequestBehavior.DenyGet));
        }
Exemple #2
0
        public void InitierTransaction(TypeCompte typeCompte, TypeTransaction typeTransaction, Epargne epargne, CompteClient compteClientEmetteur,
                                       CompteClient compteClientDestinataire, Employe employe, double montant, int nombreJourAttente)
        {
            operationBLO = new OperationBLO();
            transactionBLO.Add(new Transaction(CodeTransaction(typeTransaction), typeCompte, typeTransaction, epargne, DateTime.Now, compteClientEmetteur,
                                               compteClientDestinataire, employe, new Employe("Indefini"),
                                               montant, StatutTransaction.En_cours_de_validité, nombreJourAttente));

            if (typeTransaction == TypeTransaction.Dépot)
            {
                operationBLO.AjouterOperation(TypeOperation.Dépot, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata");
            }

            else if (typeTransaction == TypeTransaction.Retrait)
            {
                operationBLO.AjouterOperation(TypeOperation.Retrait, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata");
            }

            else
            {
                operationBLO.AjouterOperation(TypeOperation.Transfert_inter_compte, employe, compteClientEmetteur.Client, compteClientEmetteur, montant, "toto tata");
            }

            new IdentifiantBLO().AddIdTransaction();
        }
Exemple #3
0
        public void AjouterButCredit(string nom, Employe employe)
        {
            operationBLO = new OperationBLO();
            butCreditBLO.Add(new ButCredit(nom));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, new Client("Indefini"), new CompteClient("Indefini"), 0, "toto tata");
        }
        public void AjouterCompteClient(Client client, TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne,
                                        string nomStructure, int nombreMois, double montant, Employe employe)
        {
            epargneBLO     = new EpargneBLO();
            operationBLO   = new OperationBLO();
            transactionBLO = new TransactionBLO();

            int          idEpargne    = new IdentifiantBLO().IdEpargne;
            CompteClient compteClient = new CompteClient(CodeCompteClient(typeCompte, typeAppartenantCompteEpargne), client, typeCompte, typeAppartenantCompteEpargne,
                                                         nomStructure, 0, StatutCompte.En_attente_de_validité, DateTime.Now);

            compteClientBLO.Add(compteClient);

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, compteClient, 0, "toto tata");

            Epargne epargne = new Epargne(0);

            if (typeCompte == TypeCompte.Epargne)
            {
                epargneBLO.AjouterEpargne(compteClient, nombreMois, 0, employe);

                epargne = epargneBLO.RechercheEpargne(idEpargne);
            }

            transactionBLO.InitierTransaction(typeCompte, TypeTransaction.Dépot, epargne, compteClient, new CompteClient("Indefini"), employe, montant, 0);

            new IdentifiantBLO().AddIdCompteClient();
        }
Exemple #5
0
        public void AjouterClient(string nomComplet, DateTime?dateNaissance, string lieuNaissance, StatutSexe?sexe, string numeroCNI,
                                  string numeroTelephone1, string numeroTelephone2, Pays pays, Ville ville, string adresse, string photoProfil,
                                  string profession, TypeCompte typeCompte, TypeAppartenantCompteEpargne?typeAppartenantCompteEpargne,
                                  string nomStructure, Employe employe, int nombreMois, double montant)
        {
            operationBLO = new OperationBLO();

            fichierStockeBLO = new FichierStockeBLO();

            compteClientBLO = new CompteClientBLO();

            Client client = new Client(CodeClient, nomComplet, dateNaissance, lieuNaissance, sexe, numeroCNI, numeroTelephone1,
                                       numeroTelephone2, pays, ville, adresse, photoProfil, DateTime.Now, profession, StatutClient.Desactivé);

            clientBLO.Add(client);

            compteClientBLO.AjouterCompteClient(client, typeCompte, typeAppartenantCompteEpargne, nomStructure, nombreMois, montant, employe);

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client,
                                          compteClientBLO.RechercherUnCompte(compteClientBLO.CodeCompteClient(typeCompte, typeAppartenantCompteEpargne)), 0, "toto tata");

            if (photoProfil != string.Empty)
            {
                fichierStockeBLO.AjouterFichierStocke($"Photo du client {CodeClient}", photoProfil, client, new Garantie(0), StatutStockage.Image_des_clients, employe);
            }

            new IdentifiantBLO().AddIdClient();
        }
Exemple #6
0
        public void MettreArgentEnFond(Employe employe, CompteClient compteClient, double montantAction, string description)
        {
            operationBLO = new OperationBLO();

            double montantTotal = (TousFonds[0].MontantTotal + montantAction);

            fondBLO.Add(new Fond(new IdentifiantBLO().IdFond, employe, compteClient, DateTime.Now, TypeActionFond.Entrée, montantAction, montantTotal, description));
            RenouvellerMontantTotal(montantTotal);

            if (employe.CodeEmploye != string.Empty)
            {
                operationBLO.AjouterOperation(TypeOperation.Entrée, employe, compteClient.Client, compteClient, montantAction, description);
            }

            new IdentifiantBLO().AddIdFond();
        }
Exemple #7
0
        public void AjouterOperation(TypeOperation typeOperation, Employe employe, Client client,
                                     CompteClient compteClient, double valeurOperation, string description)
        {
            operationBLO.Add(new Operation(new IdentifiantBLO().IdOperation, DateTime.Now, typeOperation, employe, client, compteClient, valeurOperation, description));

            new IdentifiantBLO().AddIdOperation();
        }
Exemple #8
0
 public IdentifiantBLO()
 {
     identifiantBLO = new RepositoireDAOFile <Identifiant>();
     if (identifiantBLO.Count == 0)
     {
         identifiantBLO.Add(new Identifiant(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1));
     }
 }
Exemple #9
0
        public void AjouterAvaliste(Garantie garantie, string nomComplet, string profession, string description, double montantParMois, Employe employe)
        {
            operationBLO = new OperationBLO();
            avalisteBLO.Add(new Avaliste(new IdentifiantBLO().IdAvaliste, garantie, nomComplet, profession, description, montantParMois));
            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, garantie.Credit.Client, new CompteClient("Indefini"), montantParMois, "toto tata");

            new IdentifiantBLO().AddIdAvaliste();
        }
Exemple #10
0
        public void AjouterPartSociale(CompteClient compteClient, StatutPartSociale statutPartSociale, double montant, Employe employe)
        {
            operationBLO = new OperationBLO();

            partSocialeBLO.Add(new PartSociale(compteClient, statutPartSociale, montant));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, compteClient.Client, compteClient, montant, "toto tata");
        }
Exemple #11
0
        public void AjouterDevise(string nomDevise, string symboleDevise, Employe employe)
        {
            operationBLO = new OperationBLO();

            deviseBLO.Add(new Devise(nomDevise, symboleDevise));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, new Client("Indefini"), new CompteClient("Indefini"), 0, "toto tata");
        }
Exemple #12
0
        public void AjouterBeneficier(string nom, string descriptionCondition, int pourcentage, CompteClient compteClient, Employe employe)
        {
            operationBLO = new OperationBLO();
            beneficierBLO.Add(new Beneficier(new IdentifiantBLO().IdBeneficier, nom, descriptionCondition, pourcentage, compteClient));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, compteClient.Client, compteClient, 0, "toto tata");

            new IdentifiantBLO().AddIdBeneficier();
        }
Exemple #13
0
        public void AjouterPays(string nom, string codePhone, Employe employe)
        {
            operationBLO = new OperationBLO();
            paysBLO.Add(new Pays(nom, codePhone));

            if (employe.CodeEmploye != string.Empty)
            {
                operationBLO.AjouterOperation(TypeOperation.Ajout, employe, new Client("Indefini"), new CompteClient("Indefini"), 0, "toto tata");
            }
        }
Exemple #14
0
        public void AjouterEpargne(CompteClient compteClient, int nombreMois, double solde, Employe employe)
        {
            operationBLO = new OperationBLO();

            epargneBLO.Add(new Epargne(new IdentifiantBLO().IdEpargne, compteClient, DateTime.Now, nombreMois, solde, StatutEpargne.En_cours));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, compteClient.Client, compteClient, solde, "toto tata");

            new IdentifiantBLO().AddIdEpargne();
        }
Exemple #15
0
        public void AjouterVille(string nom, Pays nomPays, Employe employe)
        {
            operationBLO = new OperationBLO();
            villeBLO.Add(new Ville(nom, nomPays));

            if (employe.CodeEmploye != string.Empty)
            {
                operationBLO.AjouterOperation(TypeOperation.Ajout, employe, new Client("Indefini"), new CompteClient("Indefini"), 0, "toto tata");
            }
        }
Exemple #16
0
        public void AjouterFichierStocke(string nom, string fileName, Client client, Garantie garantie, StatutStockage statutStockage, Employe employe)
        {
            operationBLO = new OperationBLO();

            fichierStockeBLO.Add(new FichierStocke(new IdentifiantBLO().IdFichierStocke, DateTime.Now, nom, fileName, client, garantie, statutStockage));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, new CompteClient("Indefini"), garantie.MontantEvaluation, "toto tata");

            new IdentifiantBLO().AddIdFichierStocke();
        }
        public void EffectuerRemboursement(Credit credit, double montant, Employe employe)
        {
            operationBLO = new OperationBLO();

            remboursementBLO.Add(new Remboursement(CodeRemboursement, credit, DateTime.Now, montant,
                                                   StatutRemboursement.En_attente_de_validité));

            operationBLO.AjouterOperation(TypeOperation.Remboursement, employe, credit.Client, new CompteClient("Indefini"), montant, "toto tata");

            new IdentifiantBLO().AddIdRemboursement();
        }
Exemple #18
0
        public void DemanderCredit(TypeCredit typeCredit, int nombreMois, Client client, Garantie garantie, double montantEmprunte,
                                   Employe employe)
        {
            operationBLO = new OperationBLO();

            creditBLO.Add(new Credit(CodeCredit, typeCredit, DateTime.Now, null, nombreMois, client, garantie, montantEmprunte,
                                     0, StatutCredit.Ouverture_du_dossier));

            operationBLO.AjouterOperation(TypeOperation.Credit, employe, garantie.Credit.Client, new CompteClient("Indefini"), montantEmprunte, "toto tata");

            new IdentifiantBLO().AddIdCredit();
        }
Exemple #19
0
        public void AjouterSalarie(CompteClient compteClientEmploye, CompteClient compteClientEntreprise, double montantSalaire,
                                   DateTime dateEmbauche, int jourDePaye, Employe employe)
        {
            operationBLO = new OperationBLO();

            salarieBLO.Add(new Salarie(new IdentifiantBLO().IdSalarie, compteClientEmploye, compteClientEntreprise, montantSalaire, dateEmbauche,
                                       DateTime.Now, StatutSalarie.En_règle, StatutPayementSalarie.Non_payé, jourDePaye));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, compteClientEmploye.Client, new CompteClient("Indefini"), montantSalaire, "toto tata");

            new IdentifiantBLO().AddIdSalarie();
        }
 public void AjouterParametreGeneral(string nomMicrofinance, string logoMicrofinance, string positionGeographiqueMicrofinance, string sloganMicrofinance,
                                     Devise deviseMicrofinance, int ageMinimalRequis, float pourcentageRetrait, float pourcentageRetraitEpargneSansAvis,
                                     float pourcentageDecouvertMaximal, float pourcentageBeneficeCompteEpargne, int nombreMinimalBeneficier,
                                     int nombreMaximalBeneficier, double montantPartSociale, double montantDeCreationCompte, double montantMininimumDepot,
                                     int nombreJourRetraitAviseDeEpargne, int nombreJourAttenteReponsePourCredit, int nombreMoisMinimalPourDecouvert,
                                     double soldeMaximalCompteCourant, double fraiesDebloquerCompte)
 {
     parametreGeneralBLO.Add(new ParametreGeneral(nomMicrofinance, logoMicrofinance, positionGeographiqueMicrofinance, sloganMicrofinance,
                                                  deviseMicrofinance, ageMinimalRequis, pourcentageRetrait, pourcentageRetraitEpargneSansAvis, pourcentageDecouvertMaximal,
                                                  pourcentageBeneficeCompteEpargne, nombreMinimalBeneficier, nombreMaximalBeneficier, montantPartSociale, montantDeCreationCompte,
                                                  montantMininimumDepot, nombreJourRetraitAviseDeEpargne, nombreJourAttenteReponsePourCredit, nombreMoisMinimalPourDecouvert,
                                                  soldeMaximalCompteCourant, fraiesDebloquerCompte));;
 }
Exemple #21
0
 public JsonResult AddEdit(Employe employe)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _service.Add(employe);
         }
         return(Json(new { sucess = true, message = "Bien reçcu" }));
     }
     catch (Exception e)
     {
         return(Json(new { sucess = false, message = e.Message }));
     }
 }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     setCustomer();
     try
     {
         _cust.Validate();
         dal.Add(_cust);
         dal.Save();
         LoadGrid();
         MessageBox.Show("New " + cbCustType.Text + " added successfully");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #23
0
        public void AjouterEmploye(string nomComplet, DateTime?dateNaissance, string lieuNaissance, StatutSexe?sexe, string numeroCNI,
                                   string numeroTelephone1, string numeroTelephone2, Pays pays, Ville ville, string adresse, string photoProfil, string motDePasse,
                                   StatutEmploye statutEmploye, Employe employe)
        {
            operationBLO = new OperationBLO();
            employeBLO.Add(new Employe(CodeEmploye(statutEmploye), nomComplet, dateNaissance, lieuNaissance, sexe, numeroCNI, numeroTelephone1,
                                       numeroTelephone2, pays, ville, adresse, photoProfil, DateTime.Now, NomUtilisateur(nomComplet, CodeEmploye(statutEmploye)), crypterMD5.GetMd5Hash(MD5.Create(), motDePasse.ToLower()), statutEmploye));

            operationBLO.AjouterOperation(TypeOperation.Embauche, employe, new Client("Indefini"), new CompteClient("Indefini"), 0, "mdp : " + motDePasse);
            if (photoProfil != string.Empty)
            {
                fichierStockeBLO.AjouterFichierStocke($"Photo de l'employe {CodeEmploye(statutEmploye)}", photoProfil, new Client("Indefini"),
                                                      new Garantie(0), StatutStockage.Image_des_employés, employe);
            }

            new IdentifiantBLO().AddIdEmploye();
        }
Exemple #24
0
        public void AjouterGarantie(Credit credit, string nom, string elementEnGarantie, Avaliste avaliste, string description, double montantEvaluation, Employe employe)
        {
            operationBLO = new OperationBLO();

            fichierStockeBLO = new FichierStockeBLO();

            garantieBLO.Add(new Garantie(new IdentifiantBLO().IdGarantie, DateTime.Now, credit, nom, elementEnGarantie, avaliste, StatutGarantie.En_gage, description, montantEvaluation));

            operationBLO.AjouterOperation(TypeOperation.Ajout, employe, credit.Client, new CompteClient("Indefini"), montantEvaluation, description);

            if (elementEnGarantie != string.Empty)
            {
                fichierStockeBLO.AjouterFichierStocke($"Garantie {nom}", elementEnGarantie, credit.Client, RechercherCredit(new IdentifiantBLO().IdGarantie),
                                                      StatutStockage.Garantie, employe);
            }

            new IdentifiantBLO().AddIdGarantie();
        }
Exemple #25
0
        public string AddSalaryStanderAndItems(T_HR_SALARYSTANDARD stand, List <T_HR_SALARYSTANDARDITEM> salaryItems)
        {
            try
            {
                salaryItems.ForEach(item =>
                {
                    stand.T_HR_SALARYSTANDARDITEM.Add(item);
                    Utility.RefreshEntity(item);
                });
                dal.Add(stand);

                return("");
            }
            catch (Exception ex)
            {
                SMT.Foundation.Log.Tracer.Debug(ex.Message);
                dal.RollbackTransaction();
                return("Error");
            }
        }
Exemple #26
0
        public ActionResult Add(Model.js model)
        {
            ViewModels.Message b = new ViewModels.Message();
            if (ModelState.IsValid)
            {
                if (dal.Add(model) > 0)
                {
                    b.sno = 1;
                }
                else
                {
                    b.sno = 3;
                    b.msg = "数据操作失败";
                }
            }
            else
            {
                b.sno = 2;
                b.msg = "数据校验失败";
            }

            return(Json(b, JsonRequestBehavior.DenyGet));
        }
Exemple #27
0
 public string Add(string dbCode, int lgIndex, MSale_Order t)
 {
     return(bll.Add(dbCode, lgIndex, t));
 }
Exemple #28
0
 public static int Add(T model)
 {
     return(dal.Add(model));
 }
Exemple #29
0
 public string Add(string dbCode, int lgIndex, MWare_Bill t)
 {
     return(bll.Add(dbCode, lgIndex, t));
 }
Exemple #30
0
 public string Add(string dbCode, int lgIndex, MSale_PriceContract t)
 {
     return(bll.Add(dbCode, lgIndex, t));
 }