public ActionResult Delete(int id, GN_Report report) { var data = AutoMapperHelper.MapToSameViewModel <GN_Report, GN_ReportViewModel>(_reportService.GetById(id)); //var data = Mapper.Map<Product, ProductViewModel>(_productService.GetById(id)); return(View(data.ToVM())); }
public ActionResult Edit(GN_Report gN_Report) { try { _gN_ReportService.Update(new GN_Report { //TODO:Alanlar buraya yazılacak Id alanı en altta olacak unutmayın!!! //Örn:BrandName = brand.BrandName, //BrandId = brand.BrandId GN_ReportId = gN_Report.GN_ReportId }); SuccessNotification("Kayıt Güncellendi"); return(RedirectToAction("GN_ReportIndex")); } catch { return(View()); } }
public ActionResult Edit(GN_Report report) { try { // TODO: Add update logic here _reportService.Update(new GN_Report { ReportTitle = report.ReportTitle, ReportFilter = report.ReportFilter, ReportSql = report.ReportSql, ReportAuthorization = report.ReportAuthorization, ReportId = report.ReportId }); SuccessNotification("Kayıt Güncellendi"); return(RedirectToAction("GN_ReportIndex")); } catch { return(View()); } }
public void Delete(GN_Report gN_Report) { _gN_ReportDal.Delete(gN_Report); }
public void Update(GN_Report gN_Report) { _gN_ReportDal.Update(gN_Report); }
public GN_Report Add(GN_Report gN_Report) { return(_gN_ReportDal.Add(gN_Report)); }