public void CRUD() { e.location obj = new e.location() { name_en = "testing", name_mm = "testing", locationtype_id = null }; //Create e.shared.ActionResult insert_result = d.location.Insert(obj).Result; //Read obj = d.location.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.location> objs = d.location.Get().Result; //Update obj.name_en = "testing update"; e.shared.ActionResult update_result = d.location.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.location.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.entry_points obj = new e.entry_points() { name_en = "testing", name_mm = "testing", lat = 0, lon = 0, remark = "remark" }; //Create e.shared.ActionResult insert_result = d.entry_points.Insert(obj).Result; //Read obj = d.entry_points.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.entry_points> objs = d.entry_points.Get().Result; //Update obj.name_en = "testing update"; e.shared.ActionResult update_result = d.entry_points.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.entry_points.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.entrypoint_category obj = new e.entrypoint_category() { category_id = 0, name_en = "Englishe name", name_mm = "Myanmar name", created_by = "Admin", creation_date = DateTime.Now, modified_by = "Admin", modified_date = DateTime.Now }; //Create e.shared.ActionResult insert_result = d.entrypoint_category.Insert(obj).Result; //Read obj = d.entrypoint_category.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.entrypoint_category> objs = d.entrypoint_category.Get().Result; //Update obj.name_en = "testing update"; e.shared.ActionResult update_result = d.entrypoint_category.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.entrypoint_category.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.patient_history obj = new e.patient_history() { type = "testing", coordinatesx = 34.8001090000001f, coordinatesy = 32.008471f, name = "testing name", place = "testing place", comments = "testing comments", pointx = 32.008471f, pointy = 34.800109f, fromtime = 1584691200000, totime = 1584709200000, sourceoid = 1, staytimes = "10:00 - 15:00", remark = "remark" }; //Create e.shared.ActionResult insert_result = d.patient_history.Insert(obj).Result; //Read obj = d.patient_history.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.patient_history> objs = d.patient_history.Get().Result; //Update obj.name = "testing update"; e.shared.ActionResult update_result = d.patient_history.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.patient_history.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.quarantine_station obj = new e.quarantine_station() { name_en = "testing", name_mm = "testing", description = "", location_id = null, capacity = 1, discontinued = false, discontinued_date = DateTime.Now }; //Create e.shared.ActionResult insert_result = d.quarantine_station.Insert(obj).Result; //Read obj = d.quarantine_station.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.quarantine_station> objs = d.quarantine_station.Get().Result; //Update obj.name_en = "testing update"; e.shared.ActionResult update_result = d.quarantine_station.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.quarantine_station.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { try { e.people_history people = new e.people_history() { mid = "123456", mhash = "mobile hash", did = "789456", dhash = "device hash", contact = "09789456123", contacttype = "Friend", duration = 14, source = "source", eventname = "event", lat = 0, lng = 0, location = "Mandalay", timestamp = DateTime.Now, remark = "Testing" }; var param = new e.people_historyQueryInfo { mid = "", did = "0", dhash = "device id", mhash = "mobile di" }; //Save e.shared.ActionResult save_action = d.people_history.Save(people).Result; //Read var obj = d.people_history.Get(param).Result; // Paging var result = d.people_history.Get(new e.people_historyParam { PgNo = 1 }).Result; //Read all IEnumerable <e.people_history> objs = d.people_history.Get().Result; //Delete e.shared.ActionResult delete_result = d.people_history.Delete(param).Result; Assert.IsTrue(true); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public async Task <IActionResult> Put([FromBody] e.patient_history obj) { try { e.shared.ActionResult result = await d.patient_history.Update(obj); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Put([FromBody] e.quarantine_station obj) { try { e.shared.ActionResult result = await d.quarantine_station.Update(obj); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Post([FromBody] e.patient_history obj) { try { e.shared.ActionResult result = await d.patient_history.Insert(obj); obj.id = int.Parse(result.Value.ToString()); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void CRUD() { var list = d.quarantine_record.Get(new e.quarantine_recordParam { PgNo = 1 }); e.quarantine_record obj = new e.quarantine_record() { station_id = null, start_date = DateTime.Now, end_date = DateTime.Now, person_name = "test name", person_nrc = "test nrc", person_ph = "test phone", person_age = "0", person_dob = DateTime.Now, gender = "male", hometown = "test home town", reason_id = null, travel_history = "test history", residence_address = "residence address", current_address = "current address", traveled_from = "travel from", fever_history = "fever history", remark = "test remark", checkout_date = DateTime.Now, result = "test result", lab_testing = true, lab_testing_date = DateTime.Now, result_date = DateTime.Now, checkedout = false }; //Create e.shared.ActionResult insert_result = d.quarantine_record.Insert(obj).Result; //Read obj = d.quarantine_record.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.quarantine_record> objs = d.quarantine_record.Get().Result; //Update obj.person_name = "testing update"; e.shared.ActionResult update_result = d.quarantine_record.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.quarantine_record.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public async Task <IActionResult> Post([FromBody] e.quarantine_station obj) { try { e.shared.ActionResult result = await d.quarantine_station.Insert(obj); obj.station_id = int.Parse(result.Value.ToString()); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Put([FromBody] e.people_history obj) { try { obj.timestamp = fn.GetLocalDateTime(obj.timestamp); e.shared.ActionResult result = await d.people_history.Save(obj); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Put([FromBody] e.entry_record obj) { try { obj.entrance_date = fn.GetLocalDateTime(obj.entrance_date); obj.person_dob = fn.GetLocalDateTime(obj.person_dob); e.shared.ActionResult result = await d.entry_record.Update(obj); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Post([FromBody] e.entry_record obj) { try { obj.entrance_date = fn.GetLocalDateTime(obj.entrance_date); obj.person_dob = fn.GetLocalDateTime(obj.person_dob); e.shared.ActionResult result = await d.entry_record.Insert(obj); obj.id = int.Parse(result.Value.ToString()); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Post([FromBody] IEnumerable <e.people_history> objs) { try { foreach (var obj in objs) { obj.timestamp = fn.GetLocalDateTime(obj.timestamp); } e.shared.ActionResult result = await d.people_history.InsertMany(objs); return(Ok(result.Status)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Delete([FromBody] e.people_historyQueryInfo param) { try { var data = await d.people_history.Delete(param); if (data == null) { return(NotFound(param)); } e.shared.ActionResult result = await d.people_history.Delete(param); return(Ok(result.Status)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Delete(int id) { try { var obj = await d.entry_record.Get(id); if (obj == null) { return(NotFound(id)); } e.shared.ActionResult result = await d.entry_record.Delete(id); return(Ok()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Put([FromBody] e.quarantine_record obj) { try { obj.start_date = fn.GetLocalDateTime(obj.start_date); obj.end_date = fn.GetLocalDateTime(obj.end_date); obj.person_dob = fn.GetLocalDateTime(obj.person_dob); obj.checkout_date = fn.GetLocalDateTime(obj.checkout_date); obj.lab_testing_date = fn.GetLocalDateTime(obj.lab_testing_date); obj.result_date = fn.GetLocalDateTime(obj.result_date); e.shared.ActionResult result = await d.quarantine_record.Update(obj); return(Ok(obj)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public void CRUD() { e.confirm_record obj = new e.confirm_record() { quarantine_id = null, station_id = null, patient_name = "test name", patient_nrc = "test nrc", patient_ph = "test phone", patient_age = "test age", patient_dob = DateTime.Now, gender = "male", hometown = "test home town", reason_id = null, travel_history = "travel history", residence_address = "resident history", current_address = "current address", traveled_from = "travel from", fever_history = "fever history", remark = "Remark", result_date = DateTime.Now, result = "test result" }; //Create e.shared.ActionResult insert_result = d.confirm_record.Insert(obj).Result; //Read obj = d.confirm_record.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.confirm_record> objs = d.confirm_record.Get().Result; //Update obj.patient_name = "testing update"; e.shared.ActionResult update_result = d.confirm_record.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.confirm_record.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.user_account obj = new e.user_account() { user_id = 0, user_name = "owner", full_name = "itstar", password = "******", phone_no = "098888888", entrypoint_user = true, dashboard_user = false, active = true, point_admin_right = true, station_id = 1, quarantine_user = false, created_by = "Admin", creation_date = DateTime.Now, entrypoint_id = 1, modified_by = "owner", modified_date = DateTime.Now, remark = "testing" }; //Create e.shared.ActionResult insert_result = d.user_account.Insert(obj).Result; //Read obj = d.user_account.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.user_account> objs = d.user_account.Get().Result; //Update obj.user_name = "testing update"; e.shared.ActionResult update_result = d.user_account.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.user_account.Delete(int.Parse(insert_result.Value.ToString())).Result; }
public void CRUD() { e.entry_record obj = new e.entry_record() { entrypoint_id = null, entrance_date = DateTime.Now, person_name = "test person", person_nrc = "test nrc", person_ph = "test phone", person_age = "1", person_dob = DateTime.Now, gender = "male", hometown = "Yangon", reason_id = null, travel_history = "test history", residence_address = "test address", current_address = "current address", traveled_from = "test from", fever_history = "test fever history", remark = "test remark" }; //Create e.shared.ActionResult insert_result = d.entry_record.Insert(obj).Result; //Read obj = d.entry_record.Get(int.Parse(insert_result.Value.ToString())).Result; //Read all IEnumerable <e.entry_record> objs = d.entry_record.Get().Result; //Update obj.fever_history = "testing update"; e.shared.ActionResult update_result = d.entry_record.Update(obj).Result; //Delete e.shared.ActionResult delete_result = d.entry_record.Delete(int.Parse(insert_result.Value.ToString())).Result; }