public IActionResult EditPromo(ManagePromo managePromo) { try { Validator.validateEditPromo(managePromo); DAPromo dAPromo = new DAPromo(); return(this.OK(dAPromo.EditPromo(managePromo, _content) ? "Recored Edited Successfully" : "Failed to Edit")); } catch (DataValidationException ex) { return(this.KnowOperationError(ex.Message)); } }
public IActionResult AddPromo(ManagePromo managePromo) { try { Validator.validateAddPromo(managePromo); DAPromo dAPromo = new DAPromo(); return(this.OK(dAPromo.AddPromo(managePromo, _content, User.ToAppUser()) ? "Recored Added Successfully" : "Failed to Add")); } catch (DataValidationException ex) { return(this.KnowOperationError(ex.Message)); } }
public IActionResult IsActivePromo(long promoid, bool activestatus) { DAPromo dAPromo = new DAPromo(); return(this.OK((dAPromo.IsActivePromo(promoid, activestatus, _content) == true)? activestatus ? "Active Successfully" : "InActive Successfully":"Status Failed")); }
public IActionResult GetPromoDetails(long promoid) { DAPromo dAPromo = new DAPromo(); return(this.OK <ManagePromo>(dAPromo.GetPromoDetails(promoid, _content))); }
public IActionResult PromoTransaction() { DAPromo dAPromo = new DAPromo(); return(this.OK <List <PromoTransaction> >(dAPromo.PromoTransaction(_content))); }
public IActionResult ManageOption() { DAPromo dAPromo = new DAPromo(); return(this.OK <List <ManagePromo> >(dAPromo.ManageOption(_content))); }
public IActionResult IsDeletePromo(long promoid) { DAPromo dAPromo = new DAPromo(); return(this.OK(dAPromo.IsDeletePromo(promoid, _content) ? "Recored Deleted Successfully" : "Failed to Delete")); }