public int SaveHeaderInformation(HeaderInformationModel model) { int Result = 0; GenericRepository <HeaderInformationModel> objGenericRepository = new GenericRepository <HeaderInformationModel>(); Result = objGenericRepository.ExecuteSQL <int>("SaveLogInformation @Referrer,@IPAddress", Utility.GetSQLParam("Referrer", SqlDbType.VarChar, !string.IsNullOrWhiteSpace(model.Referrer) ? model.Referrer : (object)DBNull.Value), Utility.GetSQLParam("IPAddress", SqlDbType.VarChar, !string.IsNullOrWhiteSpace(model.IPAddress) ? model.IPAddress : (object)DBNull.Value) ).FirstOrDefault(); return(Result); }
public ActionResult SaveHeaderInformation(HeaderInformationModel model) { var success = service.SaveHeaderInformation(model); return(Json(success, JsonRequestBehavior.AllowGet)); }