public ActionResult UpdateContactRecord(int?id, FormCollection forms) { //实例化新对象用于接收请求的数据 cst_activity newObj = new RefreshMyModel().RefreshToFormCollection <cst_activity>(ref forms, new cst_activityService().GetActivityById(id.Value)); //将数据填充到对象中 UpdateModel <cst_activity>(newObj); //修改 new cst_activityService().UpdateContactRecord(newObj); return(RedirectToAction("ContactRecord", new { id = new cst_activityService().GetActivityById(id.Value).cst_customer.cust_Id })); }
public ActionResult AllotSal(int?id, FormCollection forms) { //实例化新对象用于接收请求的数据 sal_chance sal = new RefreshMyModel().RefreshToFormCollection <sal_chance>(ref forms, new sal_chanceService().GetSalById(id.Value)); //将数据填充到对象中 UpdateModel <sal_chance>(sal); //修改 new sal_chanceService().AddOrUpdateSal(sal); return(RedirectToAction("Index")); }
public ActionResult ServiceFeedbacking(int?id, FormCollection forms) { //实例化新对象用于接收请求的数据 cst_service newObj = new RefreshMyModel().RefreshToFormCollection <cst_service>(ref forms, new cst_serviceService().GetServiceByServiceId(id.Value)); //将页面数据添加到对象中 UpdateModel <cst_service>(newObj); newObj.svr_status = "已归档"; //修改 new cst_serviceService().UpdateService(newObj); return(RedirectToAction("ServiceFeedback")); }