protected void AddLabRecord(object sender, EventArgs e) { if (null == this.SelectedTest) { hdCustID.Value = textSelectLab.Text = ""; this.isDataEntry = false; return; } LabTestGroup testGroup = this.SelectedGroup; LabTest candidate = this.SelectedTest; bool proceed = false; proceed = (null == testGroup.ComponentTest || testGroup.ComponentTest.Count == 0 || !testGroup.ComponentTest.Exists(o => o.Id == candidate.Id)); if (!proceed || candidate.IsGroup) { hdCustID.Value = textSelectLab.Text = ""; this.isDataEntry = false; return; } try { mGr.SaveGroupLabTest(candidate.Id, this.MainLabTestId); this.PopulateLabTest(); IQCareMsgBox.NotifyAction(string.Format("{0} has been added to this group", candidate.Name), "Success", false, this, ""); this.SelectedTest = null; hdCustID.Value = textSelectLab.Text = ""; this.isDataEntry = false; return; } catch (Exception ex) { this.ShowErrorMessage(ref ex); } }
private void PrintPreview(bool Privew) { crp = new rptMedicineStatus(); if (all == false) { if (this.cbxLabTest.SelectedItem != null) { LabTest lt = (LabTest)this.cbxLabTest.SelectedItem; ds = new MedicineBLL().GetMedicinesData(lt, false); } } else { ds = new MedicineBLL().GetMedicinesData(new LabTest(), true); } crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.PrintReport(); } }
private void cbxLabTest_SelectedIndexChanged(object sender, EventArgs e) { if (cbxLabTest.SelectedItem != null) { LabTest currentTest = (LabTest)this.cbxLabTest.SelectedItem; //if (currentTest.IsMedicine == false || currentTest.IsRsTenInjection == true) //{ // this.rbThreeDay.Enabled = false; // this.rbTwoDay.Enabled = false; // rbOneDay.Enabled = false; //} //else //{ // this.rbThreeDay.Enabled =true; // this.rbTwoDay.Enabled = true; // rbOneDay.Enabled = true; //} if (currentTest.IsOd) { this.rbThreeDay.Enabled = false; this.rbTwoDay.Enabled = false; this.rbOneDay.Focus(); } else { this.rbTwoDay.Enabled = true; this.rbThreeDay.Enabled = true; } } }
private void frmSecondTurn_Load(object sender, EventArgs e) { try { defaultSyring = new LabTestBLL().GetSyring(); labtests = new LabTestBLL().GetLabTests(); cbxLabTest.DataSource = labtests; cbxLabTest.DisplayMember = "TestName"; cbxLabTest.ValueMember = "LabTestId"; List <LabTest> rs10 = labtests.Where(inj => inj.IsRsTenInjection == true).ToList <LabTest>(); cbxRs10.DataSource = null; cbxRs10.DataSource = rs10; this.lblTokenDate2nd.Text = System.DateTime.Today.ToString("dd/MM/yyyy"); //set the current Token Number for 2nd Turn if not exist. Int64 tokenNo = 0; Int64.TryParse(lblCurrentTokenNumber2nd.Text, out tokenNo); if (tokenNo < 0) { GetNextTokenNumber2nd(); AssignPatientRegistrationNumber2nd(); txtCashRecieved2nd.Text = "10"; gbLabTest.Visible = false; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
//public bool Update(int id, string code, string name, int type, string unit, string note) //{ // var repo = RepositoryHelper.GetRepository<ISupplyRepository>(UnitOfWork); // try // { // var supply = repo.GetById(id); // supply.SuppliesCode = code; // supply.SuppliesName = name; // supply.SuppliesTypeId = type; // supply.Unit = unit; // supply.Note = note; // repo.Update(supply); // UnitOfWork.SaveChanges(); // } // catch (Exception) // { // return false; // } // return true; //} public bool Update(LabTest labTest) { var repo = RepositoryHelper.GetRepository <ILabTestRepository>(UnitOfWork); try { var labtest = repo.GetSimpleById(labTest.LabTestId); labtest.LabTestName = labTest.LabTestName; labtest.Description = labTest.Description; labtest.Price = labTest.Price; labtest.SampleId = labTest.SampleId; labtest.LabTestCode = labTest.LabTestCode; repo.Update(labtest); var result = UnitOfWork.SaveChanges(); if (result.Any()) { return(false); } } catch (Exception ex) { return(false); } return(true); }
private void btnAddLabTest_Click(object sender, EventArgs e) { if (cbxLabTest.SelectedValue != null) { int id = (int)cbxLabTest.SelectedValue; LabTest lbt = new LabTest(id); lbt = labtests[labtests.IndexOf(lbt)]; if (lstLabTest.Items.Contains(lbt) == false) { if (rbTwoDay.Checked) { lbt.TimesADay = 2; } else if (rbThreeDay.Checked) { lbt.TimesADay = 3; } else if (rbOneDay.Checked) { lbt.TimesADay = 1; } decimal days = 1; lbt.TotalDays = days; lstLabTest.Items.Add(lbt); lstLabTestId.Items.Add(lbt.LabTestId + "," + lbt.TimesADay); } // CalculateCashRecv2nd(); cbxLabTest.Focus(); } }
int ii_chk = 0; ///// for Lab Test Through Get Medicine Check (0 --> for direct lab test 1 --> for through btnNext_Click) ////--------- Asif - 20-04-19 private void btnNext_Click(object sender, EventArgs e) { ii_chk = 1; // btnDoTest_Click(sender, e); ////--------- Asif - 13-04-19 if (MessageBox.Show("Do You want to see the Next Patient", "See Next", MessageBoxButtons.YesNo) == DialogResult.No) { return; } HideShowLoading(true); //System.Threading.Thread.Sleep(2000); //Application.DoEvents(); List <LabTest> meds = new List <LabTest>(); frmdoctorchange fdcr = new frmdoctorchange(); for (int i = 0; i < lstLabTestId.Items.Count; i++) { LabTest med = new LabTest(); med.LabTestId = Convert.ToInt32(lstLabTestId.Items[i].ToString().Split(',').GetValue(0).ToString()); med.TimesADay = Convert.ToDecimal(lstLabTestId.Items[i].ToString().Split(',').GetValue(1).ToString()); meds.Add(med); } counter++; //sw = new StreamWriter("C:\\"+this.name+".txt",false); //sw.Write(counter); //sw.Close(); pbll.PatientChecked(pr, meds); LoadRoomTokens(); NextTokenData(); HideShowLoading(false); ii_chk = 0; //// Reset flag ////--------- Asif - 20-04-19 }
protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = (User)Session["User"]; user = CntAriCli.GetUser(user.UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "labtest" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } // LoadGeneralTypeCombo(); LoadUnitTypeCombo(); if (Request.QueryString["LabTestId"] != null) { labTestId = Int32.Parse(Request.QueryString["LabTestId"]); labTest = CntAriCli.GetLabTest(labTestId, ctx); LoadData(labTest); } }
/// <summary> /// Method that orders lab tests. /// </summary> /// <param name="appointmentId">The ID of the appointment.</param> /// <param name="labTest">An object representing the type of test that is being ordered.</param> public void OrderLabTest(int appointmentId, LabTest labTest) { if (appointmentId < 0) { throw new ArgumentException("The appointment ID cannot be negative.", "appointmentId"); } if (labTest == null) { throw new ArgumentNullException("labTest", "The lab test cannot be null."); } string insertStatement = "INSERT ConductedLabTest (appointmentId, testCode) " + "VALUES (@AppointmentId, @TestCode)"; using (SqlConnection connection = ClinicDBConnection.GetConnection()) { connection.Open(); using (SqlCommand insertCommand = new SqlCommand(insertStatement, connection)) { insertCommand.Parameters.AddWithValue("@AppointmentId", appointmentId); insertCommand.Parameters.AddWithValue("@TestCode", labTest.TestCode); insertCommand.ExecuteNonQuery(); } } }
internal IList <LabTest> toTests(string response) { IList <LabTest> result = new List <LabTest>(); if (!String.IsNullOrEmpty(response)) { string[] lines = response.Split(new string[] { StringUtils.CRLF }, StringSplitOptions.RemoveEmptyEntries); foreach (string line in lines) { string[] pieces = line.Split(new string[] { StringUtils.CARET }, StringSplitOptions.None); if (pieces == null || pieces.Length != 2) { continue; } LabTest test = new LabTest() { Id = line, Name = pieces[1] }; // ID is the whole line - the call to getTestDescription takes the whole thing so we won't separate result.Add(test); } } return(result); }
private void dgTestResults_TestResults_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex >= 0) { selectedTestResult = (LabTest)frmPatientRecordTabs.dgTestResults_TestResults.CurrentRow.DataBoundItem; selectedTestResultId = selectedTestResult.TestID.ToString(); selectedTestResultPerformedDate = selectedTestResult.PerformedDate; selectedTestResultName = selectedTestResult.TestName; selectedTestResultCode = selectedTestResult.TestCode; string resultText = CheckResults(selectedTestResult.TestResult); string message = "Selected Test: " + selectedTestResultName + " Code: " + selectedTestResultCode + " Results: " + resultText + " " + selectedTestResultPerformedDate + " Test ID:" + selectedTestResultId + "...Pressing the start routine checkup Button will select the appointment for checkup."; frmPatientRecordTabs.txtTestId.Text = selectedTestResultId; frmPatientRecordTabs.dtPerformedDate.Value = selectedTestResultPerformedDate; this.mainForm.Status(message, Color.Transparent); } else { this.mainForm.Status("No Test Result has been selected.", Color.Yellow); } } catch (Exception) { throw; } }
/* get lab appointment by lab apponiment id search key word*/ public DataSet getSearcehdLabAppointment(string labappmnt = null) { string query; int appmntID = Convert.ToInt32(labappmnt); LabTest labtest = new LabTest(); if (conn.State.ToString() == "Closed") { conn.Open(); } query = "SELECT la.labAppointmentID ,la.labPatientID ,lp.labPatientName ,la.labAppointmentDate FROM lab_patient lp, lab_appointment la WHERE lp.labPatientID = la.labPatientID AND la.labAppointmentID like '%" + appmntID + "%'"; MySqlCommand newCmd = new MySqlCommand(query, conn); DataSet ds = new DataSet(); try { MySqlDataAdapter da = new MySqlDataAdapter(newCmd); da.Fill(ds, "lab_appointments"); } catch (Exception e) { MessageBox.Show("DB Error " + e.Message); } conn.Close(); return(ds); }
public bool MedicineCanceled(PatientRegistration pr, LabTest medicine) { try { con = new OleDbConnection(); this.readconfile = new ReadConfigFile(); con.ConnectionString = this.readconfile.ConfigString(ConfigFiles.ProjectConfigFile); con.Open(); tran = con.BeginTransaction(); string delete = "delete from MedicineIssuedByDoc where TokenDate='" + pr.TokenDate + "' and TokenMonthYear=" + pr.TokenMonthYear + " and TokenNumber=" + pr.TokenNumber + " and ID=" + medicine.MedicineIssuedSerialID; cmd = new OleDbCommand(); cmd.Connection = con; cmd.Transaction = tran; cmd.CommandText = delete; cmd.ExecuteNonQuery(); cmd.CommandText = "insert into MedicineIssued_Canceled(TokenDate,TokenMonthYear,TokenNumber,MedicineID,DosePerDay,MedicineCanceled) values('" + pr.TokenDate + "'," + pr.TokenMonthYear + "," + pr.TokenNumber + "," + medicine.LabTestId + "," + medicine.TimesADay + ",1)"; cmd.ExecuteNonQuery(); tran.Commit(); return(true); } catch (Exception ex) { tran.Rollback(); throw ex; } finally { con.Close(); } }
public bool LabTestCanceled(PatientRegistration pr, LabTest medicine) { try { con = new OleDbConnection(); this.readconfile = new ReadConfigFile(); con.ConnectionString = this.readconfile.ConfigString(ConfigFiles.ProjectConfigFile); con.Open(); tran = con.BeginTransaction(); string delete = "delete from LabTestPerformed where TokenDate='" + pr.TokenDate + "' and TokenMonthYear=" + pr.TokenMonthYear + " and TokenNumber=" + pr.TokenNumber + " and LabTestID=" + medicine.LabTestId; cmd = new OleDbCommand(delete, con); cmd.Transaction = tran; // cmd.ExecuteNonQuery(); cmd.CommandText = "insert into LabTestPerformed_Canceled(TokenDate,TokenMonthYear,TokenNumber,LabTestID,TestCanceled) values('" + pr.TokenDate + "'," + pr.TokenMonthYear + "," + pr.TokenNumber + "," + medicine.LabTestId + ",1)"; cmd.ExecuteNonQuery(); tran.Commit(); return(true); } catch (Exception ex) { tran.Rollback(); throw ex; } finally { con.Close(); } }
private void btnAddLabTest_Click(object sender, EventArgs e) { if (cbxLabTest.SelectedValue != null) { int id = (int)cbxLabTest.SelectedValue; LabTest lbt = new LabTest(id); lbt = labtests[labtests.IndexOf(lbt)]; if (lstLabTest.Items.Contains(lbt) == false) { if (rbTwoDay.Checked) { lbt.TimesADay = 2; } else if (rbThreeDay.Checked) { lbt.TimesADay = 3; } else if (rbOneDay.Checked) { lbt.TimesADay = 1; } decimal days = 1; bool r = decimal.TryParse(this.txtDays.Text.Trim(), out days); lbt.TotalDays = days; lstLabTest.Items.Add(lbt); } CalculateCashRecv2nd(); } }
private void cbxLabTest_SelectedIndexChanged(object sender, EventArgs e) { if (cbxLabTest.SelectedItem != null) { LabTest currentTest = (LabTest)this.cbxLabTest.SelectedItem; if (currentTest.IsMedicine == false || currentTest.IsRsTenInjection == true) { this.rbThreeDay.Enabled = false; this.rbTwoDay.Enabled = false; rbOneDay.Enabled = false; txtDays.Enabled = false; } else { txtDays.Enabled = true; this.rbThreeDay.Enabled = true; this.rbTwoDay.Enabled = true; rbOneDay.Enabled = true; } if (currentTest.IsOd) { this.rbThreeDay.Enabled = false; this.rbTwoDay.Enabled = false; this.rbOneDay.Checked = true; } else { this.rbOneDay.Enabled = true; this.rbTwoDay.Enabled = true; this.rbThreeDay.Enabled = true; } } }
private static IList <LabTest> buildLabTestList(MySqlCommand cmd) { var labTests = new List <LabTest>(); using (MySqlDataReader reader = cmd.ExecuteReader()) { var apptIdOrdinal = reader.GetOrdinal("apptID"); var testTypeCodeOrdinal = reader.GetOrdinal("testTypeCode"); var resultsOrdinal = reader.GetOrdinal("results"); var abnormalityOrdinal = reader.GetOrdinal("abnormality"); var datetimeOrdinal = reader.GetOrdinal("testDatetime"); var testTypeNameOrdinal = reader.GetOrdinal("name"); while (reader.Read()) { var labTest = new LabTest(); var testType = new TestType { Code = DbDefault.GetInt(reader, testTypeCodeOrdinal), Name = DbDefault.GetString(reader, testTypeNameOrdinal) }; labTest.TestType = testType; labTest.AppointmentID = DbDefault.GetInt(reader, apptIdOrdinal); labTest.Results = DbDefault.GetString(reader, resultsOrdinal); labTest.Abnormality = DbDefault.GetString(reader, abnormalityOrdinal); labTest.Date = DbDefault.GetDatetime(reader, datetimeOrdinal); labTests.Add(labTest); } return(labTests); } }
public bool SaveSyring(LabTest syring) { try { int VID = 0; con = new OleDbConnection(); this.readconfile = new ReadConfigFile(); con.ConnectionString = this.readconfile.ConfigString(ConfigFiles.ProjectConfigFile); con.Open(); tran = con.BeginTransaction(); cmd = new OleDbCommand("", con); //cmd.Connection = con; cmd.Transaction = tran; //cmd.CommandType = CommandType.Text; cmd.CommandText = "Update Syring set SyringeCode=" + syring.LabTestId + ",SyringeName='" + syring.TestName + "' where ID=1"; cmd.ExecuteNonQuery(); tran.Commit(); } catch (Exception ex) { tran.Rollback(); throw ex; } finally { con.Close(); } return(true); }
public int Insert(LabTest labTest) { InsertCommand.Parameters["@ItemName"].Value = labTest.ItemName; InsertCommand.Parameters["@MMK"].Value = labTest.MMK; InsertCommand.Parameters["@USD"].Value = labTest.USD; InsertCommand.Parameters["@Status"].Value = labTest.Status; int returnValue = -1; try { InsertCommand.Connection.Open(); returnValue = (int)InsertCommand.ExecuteScalar(); } catch (SqlException ex) { Logger.Write(ex); } finally { InsertCommand.Connection.Close(); } return(returnValue); }
public int Update(LabTest labTest) { UpdateCommand.Parameters["@ID"].Value = labTest.ID; UpdateCommand.Parameters["@ItemName"].Value = labTest.ItemName; UpdateCommand.Parameters["@MMK"].Value = labTest.MMK; UpdateCommand.Parameters["@USD"].Value = labTest.USD; UpdateCommand.Parameters["@Status"].Value = labTest.Status; int returnValue = -1; try { UpdateCommand.Connection.Open(); returnValue = UpdateCommand.ExecuteNonQuery(); } catch (SqlException ex) { Logger.Write(ex); } finally { UpdateCommand.Connection.Close(); } return(returnValue); }
public void Run <TFactory, TInput>(TInput input) where TFactory : LabTestFactory, new() { LabTestFactory factory = new TFactory();; LabTest labTest = factory.CreateLabTest(); labTest.Run(input); }
private void frmPatientRegistration_Load(object sender, EventArgs e) { defaultSyring = new LabTestBLL().GetSyring(); try { //initialize the cash received value by token value this.txtCashRecieved.Text = ((int)TokenType.General).ToString(); //load the rooms this.lstRooms.DataSource = rbll.GetRooms(); //set the current Date this.lblTokenDate.Text = System.DateTime.Today.ToString("dd/MM/yyyy"); //set the current Token Number GetNextTokenNumber(); //Create Unique Patient Registration Number AssignPatientRegistrationNumber(pbll.GetNextTokenNumber()); //assign focus to patient first Name this.txtPatientFirstName.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Load Patient Registration Screen"); } }
public HttpResponseMessage Put([FromBody] LabTest labModel) { try { if (labModel != null) { labModel.LabTestId = ObjectId.Parse(labModel.LabTestTempId); var lab = _lab.GetAll().Where(s => s.LabName == labModel.LabName); if (lab.Any()) { labModel.LabTempId = (lab.FirstOrDefault(s => s.LabName == labModel.LabName).LabId).ToString(); _labTest.Update(labModel); return(Request.CreateResponse(HttpStatusCode.OK)); } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Lab cannot be found.")); } } else { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Model cannot be null.")); } } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Something went wrong! Try Later.")); } }
protected void gridlabMaster_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { LabTest row = ((LabTest)e.Row.DataItem); e.Row.Cells[2].Text = row.IsGroup ? "Yes" : "No"; e.Row.Cells[5].Text = row.Active ? "Active" : "Inactive"; Button buttonActivate = e.Row.FindControl("buttonEdit") as Button; Label labelText = e.Row.FindControl("labelText") as Label; if (null != buttonActivate) { buttonActivate.Text = row.Active ? "Make Inactive" : "Activate"; buttonActivate.CommandName = row.Active ? "SetInactive" : "SetActive"; } if (null != labelText) { labelText.Text = string.Format("You are about delete {0}. <br /> Are you sure you want to proceed?", row.Name); } } } catch (Exception ex) { this.ShowErrorMessage(ref ex); } }
public LabTest GetLabTestById(int LabTestId) { DataTable dt = this.GetLabTests(null); LabTest result = null; TestDepartment department = null; if (null != dt && dt.Rows.Count == 1) { DataRow row = dt.Rows[0]; result = new LabTest() { Id = Convert.ToInt32(row["Id"]), Name = row["Name"].ToString(), IsGroup = Convert.ToBoolean(row["IsGroup"]), ReferenceId = row["ReferenceId"].ToString(), ParameterCount = Convert.ToInt32(row["ParameterCount"]), Department = row["DepartmentId"] == DBNull.Value ? department : new TestDepartment() { Id = Convert.ToInt32(row["DepartmentId"]), Name = row["Department"].ToString() }, Active = Convert.ToBoolean(row["Active"]), DeleteFlag = Convert.ToBoolean(row["DeleteFlag"]), TestParameter = this.GetLabTestParameters(LabTestId) }; } return(result); }
public LabTestGroup GetGroupLabTest(int mainTestId) { LabTest mainLabTest = this.GetLabTestById(mainTestId); ClsObject obj = new ClsObject(); ClsUtility.Init_Hashtable(); ClsUtility.AddExtendedParameters("@MainTestId", SqlDbType.Int, mainTestId); DataTable dt = (DataTable)obj.ReturnObject(ClsUtility.theParams, "Laboratory_GroupGetLabTest", ClsUtility.ObjectEnum.DataTable); LabTestGroup groupLab = new LabTestGroup() { GroupTest = mainLabTest }; TestDepartment department = null; var component = (from row in dt.AsEnumerable() select new LabTest() { Id = Convert.ToInt32(row["Id"]), Name = row["Name"].ToString(), IsGroup = Convert.ToBoolean(row["IsGroup"]), ReferenceId = row["ReferenceId"].ToString(), ParameterCount = Convert.ToInt32(row["ParameterCount"]), Department = row["DepartmentId"] == DBNull.Value ? department : new TestDepartment() { Id = Convert.ToInt32(row["DepartmentId"]), Name = row["Department"].ToString() }, DeleteFlag = Convert.ToBoolean(row["DeleteFlag"]), Active = Convert.ToBoolean(row["Active"]), TestParameter = null } ).ToList <LabTest>(); groupLab.ComponentTest = component; obj = null; return(groupLab); }
public static List <LabTest> GetLabTestNote(int mrn, int dateStart, int dataEnd) { LabTest tmp = null; List <LabTest> rtnList = new List <LabTest>(); string sqlString = " select b.TestNotes as 'note', b.DoDate as 'doDate', a.OrderNo as 'orderNo', b.specimenid as 'sID' " + " from [LISSerV].[his].[dbo].LabOrder a join [LISSerV].[his].[dbo].labspecimen b on a.OrderNo = b.OrderNo " + " where a.Mrn = @MRN and b.DoDate >= @DATESTART and b.DoDate <=@DATEEND and b.DoState >= '5' "; SqlParameter[] cmdParms = new SqlParameter[] { new SqlParameter("@MRN", SqlDbType.Int), new SqlParameter("@DATESTART", SqlDbType.Int), new SqlParameter("@DATEEND", SqlDbType.Int) }; cmdParms[0].Value = mrn; cmdParms[1].Value = dateStart; cmdParms[2].Value = dataEnd; DataSet ds = DbHelperSQL_18.Query(sqlString, cmdParms); DataTable dt = ds.Tables["ds"]; //遍历行 foreach (DataRow dr in dt.Rows) { //遍历列 tmp = new LabTest(); tmp.testNote = dr["note"].ToString().Trim(); tmp.doDate = (int)dr["doDate"]; tmp.sID = int.Parse(dr["sID"].ToString().Trim()); tmp.orderNo = int.Parse(dr["orderNo"].ToString().Trim()); rtnList.Add(tmp); } return(rtnList); }
private void frmThirdTurn_Load(object sender, EventArgs e) { defaultSyring = new LabTestBLL().GetSyring(); //set the current Date this.lblThirdTokenDate.Text = System.DateTime.Today.ToString("dd/MM/yyyy"); GetNextTokenNumber3nd(); }
public JsonResult UpdateLabTest(LabTest labTest) { var result = _labTestService.Update(labTest); return(Json(new { sucess = result })); }
public JsonResult AddLabTest(LabTest labTest) { var result = _labTestService.AddLabTest(labTest); return(Json(new { sucess = result })); }
internal IList<LabTest> toTests(string response) { IList<LabTest> result = new List<LabTest>(); if (!String.IsNullOrEmpty(response)) { string[] lines = response.Split(new string[] { StringUtils.CRLF }, StringSplitOptions.RemoveEmptyEntries); foreach (string line in lines) { string[] pieces = line.Split(new string[] { StringUtils.CARET }, StringSplitOptions.None); if (pieces == null || pieces.Length != 2) { continue; } LabTest test = new LabTest() { Id = line, Name = pieces[1] }; // ID is the whole line - the call to getTestDescription takes the whole thing so we won't separate result.Add(test); } } return result; }