public JsonResult Save(Int64 id, string empSelect, string cusSelect, string itemSelect, string description) { timeActivity = id > 0 ? new TimeActivityRepository().Get(this, id) : new TimeActivitydto(); timeActivityService = new TimeActivityService(timeActivity); timeActivity.EmployeeSelected = empSelect; timeActivity.CustomerSelected = cusSelect; timeActivity.ItemSelected = itemSelect; timeActivity.Description = description; timeActivity = timeActivityService.Save(timeActivity); timeActivityRepository = new TimeActivityRepository(); timeActivity = timeActivityRepository.Save(this, timeActivity); return(GetJsonObject(timeActivity, timeActivityRepository)); }
public ActionResult Load(Int64 id) { Syncdto syncDetails = id > 0 ? new SyncRepository().Get(this, id) : new Syncdto(); timeActivity.oAuthTokens = syncDetails.OauthToken; timeActivity.Syncdto = syncDetails; timeActivity.EmployeeList = syncDetails.EmployeeList; timeActivity.CustomerList = syncDetails.CustomerList; timeActivity.ItemList = syncDetails.ItemList; timeActivityService = new TimeActivityService(timeActivity); timeActivity = timeActivityService.LoaddropdownList(timeActivity); timeActivity.CompanyId = timeActivity.oAuthTokens.Realmid; timeActivityRepository = new TimeActivityRepository(); timeActivityRepository.Save(this, timeActivity); multiplemodels = new Multiplemodels(); multiplemodels.TimeActivityModel = timeActivity; multiplemodels.SyncObjectsModel = syncDetails; multiplemodels.IsConnected = syncDetails.OauthToken.IsConnected; multiplemodels.IsReadytoInvoice = true; return(View("TimeActivity", multiplemodels)); }