Ejemplo n.º 1
0
 public async Task <ActionResult> UpdateCoppon(OutModels.Models.Coppon coppon)
 {
     try
     {
         CopponModel wm = (CopponModel)_mapper.Map <OutModels.Models.Coppon, CopponModel>(coppon);
         return(new JsonResult(await this._repository.Update(wm)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Ejemplo n.º 2
0
 public async Task <ActionResult> DeleteCoppon(OutModels.Models.Coppon coppon)
 {
     try
     {
         int id = coppon.CP_Id;
         if (id == 0)
         {
             return(new JsonResult(ResponseModel.Error("موردی یافت نشد")));
         }
         return(new JsonResult(await this._repository.LogicalDelete(id)));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }