public ActionResult SendApp(ApplicationsModel projectVM) { Domain.Entity.Application p = new Domain.Entity.Application { Date = projectVM.Date, Description = projectVM.Description, IdUser = projectVM.IdUser //hetha zedtha bla test ken fama mochkol raho hna }; apps.Add(p); apps.Commit(); return(new HttpStatusCodeResult(System.Net.HttpStatusCode.OK)); }
public void TestAddApplication() { /* Tests if application is added to context */ Application application = new Application() { Id = 2, FirstName = "George", LastName = "Bikles", }; _application.Add(application); var getApplication = _application.GetApplication(2); Assert.Equal(2, getApplication.Id); }
public void TestAdd() { var req = new Request <Application>() { Obj = new Application() { CreateDate = DateTime.Now, Name = "通用权限系统", Code = "GPS", CreateUserId = 1, CreateUserName = "******", Remark = "通用权限系统 ( General Permissions System )" } }; var res = service.Add(req); Assert.AreEqual(res.Status, 0); }
public ActionResult Create(Application app) { Application p = new Application(); try { // TODO: Add insert logic here p.Date = app.Date; p.Description = app.Description; p.IdUser = Int32.Parse(System.Web.HttpContext.Current.User.Identity.GetUserId()); appservice.Add(p); appservice.Commit(); return(RedirectToAction("index", "Home")); } catch { return(View()); } }
public JsonResult Add(Application app) { var entity = new Application() { Name = app.Name, Enabled = app.Enabled, Remark = app.Remark, SortCode = app.SortCode, Code = app.Code, CreateUserId = SessionUser.Data.Id, CreateUserName = SessionUser.Data.UserName, CreateDate = DateTime.Now }; var response = service.Add(new Qz.Core.Entity.Request <Application> { Obj = entity }); return(Json(response)); }
public ActionResult Create([Bind(Include = "Id,Name,Description,Customer,CreationDate,LastUpdated,RowVersion")] Application application) { if (ModelState.IsValid) { application.Id = Guid.NewGuid(); _oApplicationService.Add(application); foreach (var qualityAttributesMetric in _oQualityAttributesMetricService.GetAll()) { var applicationEvaluation = new ApplicationEvaluation { Id = Guid.NewGuid(), QualityAttributesMetricId = qualityAttributesMetric.Id, ApplicationId = application.Id, UserValue = qualityAttributesMetric.EvaluationValue }; _oApplicationEvaluationService.Add(applicationEvaluation); } return(RedirectToAction("Edit", new { Id = application.Id })); } return(View(application)); }
public ActionResult Create(Application a) { aps.Add(a); aps.Commit(); return(RedirectToAction("Index")); }