public ActionResult AddSocialInsurance(int?DotBCBHXHId, string Type, int?StaffId) { var DotBCBHXHDetail = new DotBCBHXHDetail(); DotBCBHXHDetail.IsDeleted = false; DotBCBHXHDetail.CreatedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.ModifiedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.AssignedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.CreatedDate = DateTime.Now; DotBCBHXHDetail.ModifiedDate = DateTime.Now; DotBCBHXHDetail.DotBCBHXHId = DotBCBHXHId; //DotBCBHXHDetail.SocialInsuranceId = SocialInsuranceId; DotBCBHXHDetail.Type = Type; DotBCBHXHDetail.StaffId = StaffId; DotBCBHXHDetailRepository.InsertDotBCBHXHDetail(DotBCBHXHDetail); return(Content("success")); }
public ActionResult Create(DotBCBHXHDetailViewModel model) { if (ModelState.IsValid) { var DotBCBHXHDetail = new DotBCBHXHDetail(); AutoMapper.Mapper.Map(model, DotBCBHXHDetail); DotBCBHXHDetail.IsDeleted = false; DotBCBHXHDetail.CreatedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.ModifiedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.AssignedUserId = WebSecurity.CurrentUserId; DotBCBHXHDetail.CreatedDate = DateTime.Now; DotBCBHXHDetail.ModifiedDate = DateTime.Now; DotBCBHXHDetailRepository.InsertDotBCBHXHDetail(DotBCBHXHDetail); TempData[Globals.SuccessMessageKey] = App_GlobalResources.Wording.InsertSuccess; return(RedirectToAction("Index")); } return(View(model)); }