public void Delete(PartyTypeModel partytypemodel)
        {
            Mapper.Initialize(map => { map.CreateMap <PartyTypeModel, PartyType>(); });
            var partyData = Mapper.Map <PartyType>(partytypemodel);

            // partyData.IsDelete = true;
            partyRepository.Delete(partyData);
        }
Exemplo n.º 2
0
 //[Authorize(Roles = "Super Admin")]
 public JsonResult Delete(int pk)
 {
     if (Session["role"] == null)
     {
         Session["userId"] = null;
         Session["role"]   = null;
         return(Json(false, JsonRequestBehavior.AllowGet));
     }
     else if (Session["role"].ToString() == "Super Admin")
     {
         return(Json(partyRepository.Delete(pk), JsonRequestBehavior.AllowGet));
     }
     else
     {
         Session["userId"] = null;
         Session["role"]   = null;
         return(Json(false, JsonRequestBehavior.AllowGet));
     }
 }
Exemplo n.º 3
0
 public void Delete(Guid partyId) => _partyRepository.Delete(partyId);