public ActionResult HospitalLaboratorySchedule_Create([DataSourceRequest] DataSourceRequest request, ViewModel_lisLaboratorySchedule crud, string sHospRowid) { string sRowid = Guid.NewGuid().ToString(); if (!String.IsNullOrEmpty(sHospRowid) && ModelState.IsValid) { var entity = new lisLaboratorySchedule { LLSRowid = sRowid, HospRowid = sHospRowid, LLMRowid = crud.LLMRowid, LLSImportFormat = crud.LLSImportFormat, LLSDelimiter = crud.LLSDelimiter, LLSSqlServer = crud.LLSSqlServer, LLSInitialCatalog = crud.LLSInitialCatalog, LLSSqlLogin = crud.LLSSqlLogin, LLSSqlPassword = crud.LLSSqlPassword, LLSSqlHeadTable = crud.LLSSqlHeadTable, LLSSqlBodyTable = crud.LLSSqlBodyTable, LLSLogin01 = crud.LLSLogin01, LLSLogin02 = crud.LLSLogin02, LLSLogin03 = crud.LLSLogin03, LLSPassword = crud.LLSPassword, LLSAPIUrl = crud.LLSAPIUrl, LLSMon = crud.LLSMon, LLSTue = crud.LLSTue, LLSWed = crud.LLSWed, LLSThu = crud.LLSThu, LLSFri = crud.LLSFri, LLSSat = crud.LLSSat, LLSSun = crud.LLSSun, LLSTime01 = crud.LLSTime01, LLSTime02 = crud.LLSTime02, LLSTime03 = crud.LLSTime03, LLSTime04 = crud.LLSTime04, LLSTime05 = crud.LLSTime05, LLSDescription = crud.LLSDescription, LLSReceiveMail = crud.LLSReceiveMail, LLSDBPath = crud.LLSDBPath, LLSDBHeadTable = crud.LLSDBHeadTable, LLSDBBodyTable = crud.LLSDBBodyTable, LLSGetDataPeriod = crud.LLSGetDataPeriod, LLSLabID = crud.LLSLabID, LLSLabMappingField = crud.LLSLabMappingField, LLSLock = crud.LLSLock, LLSRowHead = crud.LLSRowHead, LLSImport2CMSv1 = crud.LLSImport2CMSv1, LLSClinicCode = crud.LLSClinicCode }; db_zmlis.lisLaboratorySchedule.Add(entity); db_zmlis.SaveChanges(); crud.LLSRowid = entity.LLSRowid; } return(Json(new[] { crud }.ToDataSourceResult(new DataSourceRequest(), ModelState))); }
public ActionResult HospitalLaboratorySchedule_Update([DataSourceRequest] DataSourceRequest request, ViewModel_lisLaboratorySchedule crud) { if (ModelState.IsValid) { var entity = new lisLaboratorySchedule { LLSRowid = crud.LLSRowid, HospRowid = crud.HospRowid, LLMRowid = crud.LLMRowid, LLSImportFormat = crud.LLSImportFormat, LLSDelimiter = crud.LLSDelimiter, LLSSqlServer = crud.LLSSqlServer, LLSInitialCatalog = crud.LLSInitialCatalog, LLSSqlLogin = crud.LLSSqlLogin, LLSSqlPassword = crud.LLSSqlPassword, LLSSqlHeadTable = crud.LLSSqlHeadTable, LLSSqlBodyTable = crud.LLSSqlBodyTable, LLSLogin01 = crud.LLSLogin01, LLSLogin02 = crud.LLSLogin02, LLSLogin03 = crud.LLSLogin03, LLSPassword = crud.LLSPassword, LLSAPIUrl = crud.LLSAPIUrl, LLSMon = crud.LLSMon, LLSTue = crud.LLSTue, LLSWed = crud.LLSWed, LLSThu = crud.LLSThu, LLSFri = crud.LLSFri, LLSSat = crud.LLSSat, LLSSun = crud.LLSSun, LLSTime01 = crud.LLSTime01, LLSTime02 = crud.LLSTime02, LLSTime03 = crud.LLSTime03, LLSTime04 = crud.LLSTime04, LLSTime05 = crud.LLSTime05, LLSDescription = crud.LLSDescription, LLSReceiveMail = crud.LLSReceiveMail, LLSDBPath = crud.LLSDBPath, LLSDBHeadTable = crud.LLSDBHeadTable, LLSDBBodyTable = crud.LLSDBBodyTable, LLSGetDataPeriod = crud.LLSGetDataPeriod, LLSLabID = crud.LLSLabID, LLSLabMappingField = crud.LLSLabMappingField, LLSLock = crud.LLSLock, LLSRowHead = crud.LLSRowHead, LLSImport2CMSv1 = crud.LLSImport2CMSv1, LLSClinicCode = crud.LLSClinicCode }; db_zmlis.lisLaboratorySchedule.Attach(entity); db_zmlis.Entry(entity).State = EntityState.Modified; db_zmlis.SaveChanges(); } return(Json(new[] { crud }.ToDataSourceResult(request, ModelState))); }
public ActionResult HospitalLaboratorySchedule_Destroy([DataSourceRequest] DataSourceRequest request, lisLaboratorySchedule crud) { if (ModelState.IsValid) { var entity = new lisLaboratorySchedule { LLSRowid = crud.LLSRowid }; db_zmlis.lisLaboratorySchedule.Attach(entity); db_zmlis.lisLaboratorySchedule.Remove(entity); db_zmlis.SaveChanges(); } return(Json(new[] { crud }.ToDataSourceResult(request, ModelState))); }