public ActionResult ClientEventDetails(System.Guid clientEventId) { return(View( MVCHelper.Resolve(Request, "Client", "ClientEvent", "ClientEventDetails"), new CrudeClientEventServiceClient().FetchByClientEventId(clientEventId) )); }
public ActionResult ClientEventCreate(System.Guid?clientId, System.Guid?userId) { var contract = new CrudeClientEventContract(); if (clientId != null) { contract.ClientId = (System.Guid)clientId; } if (userId != null) { contract.UserId = (System.Guid)userId; } ViewBag.ClientEventTypeRcd = new SelectList(new CrudeClientEventTypeRefServiceClient().FetchAll(), "ClientEventTypeRcd", "ClientEventTypeName", contract.ClientEventTypeRcd ); if (userId == null) { contract.UserId = new System.Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}"); } ViewBag.DefaultUserName = new CrudeDefaultUserServiceClient().FetchByDefaultUserId(contract.UserId).DefaultUserName; contract.DateTime = DateTime.UtcNow; return(View( MVCHelper.Resolve(Request, "Client", "ClientEvent", "ClientEventCreate"), contract )); }
public ActionResult ClientAddressEdit( System.Guid clientId ) { ViewBag.ClientId = clientId; CrudeClientContract clientContract = new CrudeClientServiceClient().FetchByClientId(clientId); CrudeClientAddressContract addressContract; if (clientContract.ClientAddressId != Guid.Empty) { addressContract = new CrudeClientAddressServiceClient().FetchByClientAddressId(clientContract.ClientAddressId); } else { addressContract = new CrudeClientAddressContract(); } ViewBag.ClientAddressTypeRcd = new SelectList(new CrudeClientAddressTypeRefServiceClient().FetchAll(), "ClientAddressTypeRcd", "ClientAddressTypeName", addressContract.ClientAddressTypeRcd ); ViewBag.DefaultUserName = new CrudeDefaultUserServiceClient().FetchByDefaultUserId(addressContract.UserId).DefaultUserName; return(View( MVCHelper.Resolve(Request, "Client", "ClientAddress", "ClientAddressEdit"), addressContract )); }
public ActionResult ClientEventByClientIndex(System.Guid clientId) { ViewBag.ClientId = clientId; return(View( MVCHelper.Resolve(Request, "Client", "ClientEvent", "ClientEventIndex"), new CrudeClientEventServiceClient().FetchByClientId(clientId) )); }
public ActionResult ClientIndex() { return(View( MVCHelper.Resolve( Request, "Client", "ClientIndex"), new ClientSearchService().GetClientWithFilter(string.Empty, string.Empty) )); }
public ActionResult ClientEventEdit([Bind()] CrudeClientEventContract contract) { if (ModelState.IsValid) { new CrudeClientEventServiceClient().Update(contract); return(RedirectToAction("ClientEventByClientIndex", new { clientId = contract.ClientId })); } return(View( MVCHelper.Resolve(Request, "Client", "ClientEvent", "ClientEventEdit"), contract )); }
public ActionResult ClientContactMethodCreate([Bind()] CrudeClientContactMethodContract contract) { if (ModelState.IsValid) { new CrudeClientContactMethodServiceClient().Insert(contract); return(RedirectToAction("ClientContactMethodByClientIndex", new { clientId = contract.ClientId })); } return(View( MVCHelper.Resolve(Request, "Client", "ClientContactMethod", "ClientContactMethodCreate"), contract )); }
public ActionResult ClientCreate([Bind()] CrudeClientContract contract) { if (ModelState.IsValid) { contract.ClientId = Guid.NewGuid(); new CrudeClientServiceClient().Insert(contract); return(RedirectToAction("ClientEdit", new { clientId = contract.ClientId })); } return(View( MVCHelper.Resolve(Request, "Client", "ClientCreate"), contract )); }
public ActionResult ClientEventEdit(System.Guid clientEventId) { CrudeClientEventContract contract = new CrudeClientEventServiceClient().FetchByClientEventId(clientEventId); ViewBag.ClientEventTypeRcd = new SelectList(new CrudeClientEventTypeRefServiceClient().FetchAll(), "ClientEventTypeRcd", "ClientEventTypeName", contract.ClientEventTypeRcd ); ViewBag.DefaultUserName = new CrudeDefaultUserServiceClient().FetchByDefaultUserId(contract.UserId).DefaultUserName; return(View( MVCHelper.Resolve(Request, "Client", "ClientEvent", "ClientEventEdit"), contract )); }
public ActionResult ClientAddressEdit( [Bind()] CrudeClientAddressContract contract, System.Guid clientId ) { ViewBag.ClientId = clientId; if (ModelState.IsValid) { if (contract.ClientAddressId == Guid.Empty) { // new address contract.ClientAddressId = Guid.NewGuid(); contract.UserId = new System.Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}"); contract.DateTime = DateTime.UtcNow; new CrudeClientAddressServiceClient().Insert(contract); // update client CrudeClientContract clientContract = new CrudeClientServiceClient().FetchByClientId(clientId); clientContract.ClientAddressId = contract.ClientAddressId; new CrudeClientServiceClient().Update(clientContract); } else { new CrudeClientAddressServiceClient().Update(contract); } return(RedirectToAction("ClientAddressEdit", new { clientId = clientId })); } return(View( MVCHelper.Resolve(Request, "Client", "ClientAddress", "ClientAddressEdit"), contract )); }