Ejemplo n.º 1
0
        public TypePaiementDetailPivot GetTypePaiementDetails(long id)
        {
            var item = tiersContactsRepository.GetById((int)id);
            TypePaiementDetailPivot motifPivot = Mapper.Map <GEN_TypePaiementDetail, TypePaiementDetailPivot>(item);

            return(motifPivot);
        }
Ejemplo n.º 2
0
        public TypePaiementDetailPivot GetTypePaiementDetails(long id)
        {
            var item = typePaiementDetailRepository.GetById((int)id);
            TypePaiementDetailPivot typePaiementDetailRepositoryPivot = Mapper.Map <GEN_TypePaiementDetail, TypePaiementDetailPivot>(item);

            return(typePaiementDetailRepositoryPivot);
        }
        public ActionResult DeleteConfirmed([Bind(Include = "TypePaiementDetailId")] TypePaiementDetailFormViewModel TypePaiementDetail)
        {
            TypePaiementDetailPivot cods  = Mapper.Map <TypePaiementDetailFormViewModel, TypePaiementDetailPivot>(TypePaiementDetail);
            TypePaiementDetailPivot codes = typePaiementDetailServise.GetTypePaiementDetails(cods.TypePaiementDetailId);


            typePaiementDetailServise.DeleteTypePaiementDetail(codes);
            // db.SaveChanges();
            typePaiementDetailServise.SaveTypePaiementDetail();
            return(RedirectToAction("Index"));
        }
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TypePaiementDetailPivot TypePaiementDetail = typePaiementDetailServise.GetTypePaiementDetails((int)id);

            //db.GEN_Devises.Find(id);
            if (TypePaiementDetail == null)
            {
                return(HttpNotFound());
            }

            TypePaiementDetailFormViewModel TypePaiementDetails = Mapper.Map <TypePaiementDetailPivot, TypePaiementDetailFormViewModel>(TypePaiementDetail);

            return(View(TypePaiementDetails));
        }
        public ActionResult Edit([Bind(Include = "TypePaiementDetailId,IdTypePaiement,IdModePaiement,DateCalcul,Pourcentage,NombreJour,Delai,GEN_Items_DateCalcul_Id,GEN_Items_Delai_Id,GEN_Items_ModePaiement_Id")] TypePaiementDetailPivot TypePaiementDetail)
        {
            if (ModelState.IsValid)
            {
                TypePaiementDetail.IdTypePaiement = null;

                TypePaiementDetail.sys_dateUpdate   = DateTime.Now;
                TypePaiementDetail.sys_dateCreation = DateTime.Now;
                TypePaiementDetail.sys_user         = Constantes.IdentifiantUser;
                typePaiementDetailServise.UpdateTypePaiementDetail(TypePaiementDetail);
                //   db.SaveChanges();
                typePaiementDetailServise.SaveTypePaiementDetail();
                return(RedirectToAction("Index"));
            }


            TypePaiementDetailFormViewModel TypePaiementDetailFormModel = Mapper.Map <TypePaiementDetailPivot, TypePaiementDetailFormViewModel>(TypePaiementDetail);

            return(View(TypePaiementDetailFormModel));
        }
Ejemplo n.º 6
0
 public void UpdateTypePaiementDetail(TypePaiementDetailPivot TypePaiementDetail)
 {
     typePaiementDetailRepository.Update(TypePaiementDetail.TypePaiementDetailId, Mapper.Map <TypePaiementDetailPivot, GEN_TypePaiementDetail>(TypePaiementDetail));
 }
Ejemplo n.º 7
0
        public void CreateTypePaiementDetail(TypePaiementDetailPivot TypePaiementDetail)
        {
            GEN_TypePaiementDetail item = Mapper.Map <TypePaiementDetailPivot, GEN_TypePaiementDetail>(TypePaiementDetail);

            typePaiementDetailRepository.Add(item);
        }
Ejemplo n.º 8
0
 public void UpdateTypePaiementDetail(TypePaiementDetailPivot TypePaiementDetail)
 {
     tiersContactsRepository.Update(Mapper.Map <TypePaiementDetailPivot, GEN_TypePaiementDetail>(TypePaiementDetail));
 }