public ActionResult Save() { AccruedChargesDto accruedChargesDto = new AccruedChargesDto(); TryUpdateModel <AccruedChargesDto>(accruedChargesDto); service.AccruedChargesSave(accruedChargesDto, UserInfo.UserId); return(Json("")); }
public void AccruedChargesSave(AccruedChargesDto dto, string userId) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@Id", dto.AccruedChargeId), new SqlParameter("@ProjectId", dto.ProjectId), new SqlParameter("@SupplierId", dto.SupplierId), new SqlParameter("@CostType", dto.CostType), new SqlParameter("@DepartmentCode", dto.DepartmentCode), new SqlParameter("@UserId", userId) }; db.Database.ExecuteSqlCommand("EXEC up_AccruedCharges_S @Id,@ProjectId,@SupplierId,@CostType,@DepartmentCode,@UserId", para); }