private void btnSave_Click(object sender, EventArgs e) { hbys_winApp.hisLib add = new hisLib(); string res; if (lblServiceNo.Text == "0") { res = add.addServiceName(tbAddService.Text); if (res == "1") { MessageBox.Show("Successfully Added", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured " + res, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }//end if else { res = add.updateServiceName(Int32.Parse(lblServiceNo.Text), tbAddService.Text); if (res == "1") { MessageBox.Show("Successfully Updated", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured: " + res, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void DGVrecipe_Click(object sender, EventArgs e) { hbys_winApp.hisLib show = new hisLib(); string recipeNo = DGVrecipe.SelectedRows[0].Cells["RecipeNo"].Value.ToString(); DGVdrug.DataSource = show.DrugListByRecipeNo(Convert.ToInt32(recipeNo)).Tables[0]; }
private void addPersonalDatasForm_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); hbys_winApp.hisLib myObj = new hisLib(); ds = myObj.showTitleList(); cbTitle.Items.Clear(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { titleBoxItem mbi = new titleBoxItem(); mbi.Txt = ds.Tables[0].Rows[i]["TitleName"].ToString(); mbi.Val = ds.Tables[0].Rows[i]["TitleNo"].ToString(); cbTitle.Items.Add(mbi); } if (cbTitle.Items.Count > 0) { cbTitle.SelectedIndex = 0; } /////////////////////////////////////////////////////////////// ds = myObj.showPersonalDatas(Int32.Parse(lblPersonalNo.Text)); tbFName.Text = ds.Tables[0].Rows[0]["Fname"].ToString(); tbLName.Text = ds.Tables[0].Rows[0]["Sname"].ToString(); string titleNo = ds.Tables[0].Rows[0]["TitleNo"].ToString(); for (int i = 0; i < cbTitle.Items.Count; i++) { if (((titleBoxItem)cbTitle.Items[i]).Val == titleNo) { cbTitle.SelectedIndex = i; break; } } }
private void btn_save_Click(object sender, EventArgs e) { titleBoxItem tbi = (titleBoxItem)cbTitle.SelectedItem; //MessageBox.Show(tbi.Txt + " " + tbi.Val); hbys_winApp.hisLib hl = new hisLib(); string res; if (lblPersonalNo.Text == "0") { res = hl.addPersonalDatas(tbFName.Text, tbLName.Text, Int32.Parse(tbi.Val)); //val seçmiş oldupum titleın idsi anlamına geliyor. } else { res = hl.updatePersonalDatas(tbFName.Text, tbLName.Text, Int32.Parse(tbi.Val), Int32.Parse(lblPersonalNo.Text)); } if (res == "1") { MessageBox.Show("Successfully Saved", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry an error has occured" + res, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void SaveButton_Click(object sender, EventArgs e) { //hbys_winApp.hisLib addDrugName = new hisLib(); //string result = addDrugName.addDrugName(tbDrug.Text); //if (result == "drugNameAdded") // MessageBox.Show("Succesfully Saved", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); //else // MessageBox.Show("Sorry a problem has occured","Failed",MessageBoxButtons.OK,MessageBoxIcon.Error); hbys_winApp.hisLib myLibObj = new hisLib(); string result = ""; if (lblDrugNo.Text == "0") { result = myLibObj.addDrugName(tbDrug.Text); } else { result = myLibObj.updateDrugName(Int32.Parse(lblDrugNo.Text), tbDrug.Text); } if (result == "drugNameAdded") { MessageBox.Show("Succesfully Saved", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a problem has occured " + result, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btn_Save_Survey_Name_Click(object sender, EventArgs e) { hbys_winApp.hisLib surveyName = new hisLib(); string result; if (lblSurveyNo.Text == "0") { result = surveyName.addSurveyName(tbSurvey.Text); if (result == "addSurveyName") { MessageBox.Show("Succesfully added", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + result, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { result = surveyName.updateSurveyName(tbSurvey.Text, Int32.Parse(lblSurveyNo.Text)); if (result == "updateSurveyName") { MessageBox.Show("Succesfully updated", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + result, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void btnSave_Click(object sender, EventArgs e) { hbys_winApp.hisLib saveDiag = new hisLib(); string res; if (lblDiagNo.Text == "0") { res = saveDiag.addDiagnosisName(tbDiagnosis.Text); if (res == "addDiagnosisName") { MessageBox.Show("Successfully Added", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + res, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { res = saveDiag.updateDiagnosisName(Int32.Parse(lblDiagNo.Text), tbDiagnosis.Text); if (res == "updateDiagnosisName") { MessageBox.Show("Succesfully updated", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + res, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void btn_Save_Click(object sender, EventArgs e) { hbys_winApp.hisLib addTitleNam = new hisLib(); string result; if (lblTitleNo.Text == "0") { result = addTitleNam.addTitleName(tbTitle.Text); if (result == "addTitleName") { MessageBox.Show("Succesfully added", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured : " + result, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { result = addTitleNam.updateTitleName(tbTitle.Text, Int32.Parse(lblTitleNo.Text)); if (result == "updateTitleName") { MessageBox.Show("Succesfully updated", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured : " + result, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Error); } }//end else }
private void btnSave_Click(object sender, EventArgs e) { hbys_winApp.hisLib addPatientDatasSave = new hisLib(); string result; if (lblPatientNo.Text == "0") { result = addPatientDatasSave.addPatientDatas(tbFn.Text, tbLn.Text, tbTc.Text); if (result == "addPatientDatas") { MessageBox.Show("Succesfully added", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + result, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { result = addPatientDatasSave.updatePatientDatas(tbFn.Text, tbLn.Text, tbTc.Text, Int32.Parse(lblPatientNo.Text)); if (result == "updatePatientDatas") { MessageBox.Show("Succesfully updated", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a Problem has occured : " + result, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void DGVex_Click(object sender, EventArgs e) { hbys_winApp.hisLib show = new hisLib(); string examNo = DGVex.SelectedRows[0].Cells["ExaminationNo"].Value.ToString(); DGVdiagnosis.DataSource = show.showDiagnosisListByExamNo(Convert.ToInt32(examNo)).Tables[0]; DGVsurvey.DataSource = show.showSurveyListByExamNo(Convert.ToInt32(examNo)).Tables[0]; DGVrecipe.DataSource = show.showRecipeDatasByExamNo(Convert.ToInt32(examNo)).Tables[0]; DGVrecipe_Click(sender, e); }
private void btnDel_Click(object sender, EventArgs e) { hbys_winApp.hisLib del_cmd = new hisLib(); string del_str = del_cmd.deleteDiagName(Int32.Parse(lblDiagNo.Text)); if (del_str == "diagNameDeleted") { MessageBox.Show("Successfully Deleted ", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured. :" + del_str, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnDel_Click(object sender, EventArgs e) { hbys_winApp.hisLib hl = new hisLib(); string res = hl.deleteServiceName(Int32.Parse(lblServiceNo.Text)); if (res == "1") { MessageBox.Show("Successfully Deleted", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured: " + res, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btn_delete_Click(object sender, EventArgs e) { hbys_winApp.hisLib objectHisLib = new hisLib(); string result = objectHisLib.deletePersonal(Int32.Parse(lblPersonalNo.Text)); if (result == "1") { MessageBox.Show("Successfully Deleted", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured :" + result, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnDel_Click(object sender, EventArgs e) { hbys_winApp.hisLib delete_command = new hisLib(); string del_str = delete_command.deleteSending(Int32.Parse(lblSendingNo.Text)); if (del_str == "1") { MessageBox.Show("Deleted "); } else { MessageBox.Show("Error has occured."); } }
private void btnDelete_Click(object sender, EventArgs e) { hbys_winApp.hisLib delete_command = new hisLib(); string del_str = delete_command.deleteTitleName(Int32.Parse(lblTitleNo.Text)); if (del_str == "deleteTitleName") { MessageBox.Show("Successfully Deleted ", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An Error has occured.", "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }//end method
private void addDrugNamesForm_Load(object sender, EventArgs e) { if (lblDrugNo.Text != "0") { hbys_winApp.hisLib myLibObj = new hisLib(); DataSet ds = myLibObj.getDrugSingle(Int32.Parse(lblDrugNo.Text)); tbDrug.Text = ds.Tables[0].Rows[0]["DrugName"].ToString(); btnDel.Visible = true; } else { btnDel.Visible = false; } }
private void btnSave_Click(object sender, EventArgs e) { int ExaminationNo = Convert.ToInt32(((titleBoxItem)comboBoxPatientName.SelectedItem).Val); int EstablishmentNo = Convert.ToInt32(((titleBoxItem)comboBoxEstablishment.SelectedItem).Val); hbys_winApp.hisLib hl = new hisLib(); string res = hl.addSendingDatas(Int32.Parse(lblSendingNo.Text), ExaminationNo, EstablishmentNo); if (res == "1") { MessageBox.Show("Datas successfully Saved", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured", "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnSave_Click(object sender, EventArgs e) { hbys_winApp.hisLib objectHisLib = new hisLib(); int drugNo = Convert.ToInt32(((titleBoxItem)comboDrug.SelectedItem).Val); DateTime date = dateTime.Value; string res = objectHisLib.addRecipeDatas(Int32.Parse(lblRecipeNo.Text), date, drugNo); if (res == "1") { MessageBox.Show("Succesfully Added", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured:" + res, "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAdd_Click(object sender, EventArgs e) { int drugNo = Convert.ToInt32(((titleBoxItem)comboDrug.SelectedItem).Val); int recipeNo = Convert.ToInt32(lblRecipeNo.Text); hbys_winApp.hisLib hl = new hisLib(); string res = hl.addDrug2Recipe(recipeNo, drugNo); if (res == "1") { MessageBox.Show("Successfully Added", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured", "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnAdd_Click(object sender, EventArgs e) { int SurveyNo = Convert.ToInt32(((titleBoxItem)comboSurvey.SelectedItem).Val); int ExamNo = Convert.ToInt32(lblExamNo.Text); hbys_winApp.hisLib hl = new hisLib(); string res = hl.addExamSurveyDatas(0, ExamNo, SurveyNo); if (res == "1") { MessageBox.Show("Successfully Added", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("An error has occured", "Sorry", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAdd_Click(object sender, EventArgs e) { int ExamNo = Convert.ToInt32(lblExamNo.Text); hbys_winApp.hisLib hl = new hisLib(); string res = ""; res = hl.addRecipeDatas(0, dtRecipeDate.Value, ExamNo); if (res == "1") { MessageBox.Show("added"); } else { MessageBox.Show("not added"); } }
private void btnDel_Click(object sender, EventArgs e) { hbys_winApp.hisLib delete_command = new hisLib(); string res = ""; if (lblDrugNo.Text != "0") { res = delete_command.deleteDrugName(Int32.Parse(lblDrugNo.Text)); } if (res == "drugNameDeleted") { MessageBox.Show("Succesfully Deleted", "Congratulation", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Sorry a problem has occured " + res, "Failed", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void addRecipeDatasForm_Load(object sender, EventArgs e) { DataSet drugDataSet = new DataSet(); hbys_winApp.hisLib drugHisLib = new hisLib(); drugDataSet = drugHisLib.DrugList(); comboDrug.Items.Clear(); for (int i = 0; i < drugDataSet.Tables[0].Rows.Count; i++) { titleBoxItem drugBoxItem = new titleBoxItem(); drugBoxItem.Txt = drugDataSet.Tables[0].Rows[i]["DrugName"].ToString(); drugBoxItem.Val = drugDataSet.Tables[0].Rows[i]["DrugNo"].ToString(); comboDrug.Items.Add(drugBoxItem); } if (comboDrug.Items.Count > 0) { comboDrug.SelectedItem = 0; } }
private void addDiagnosisNamesForm_Load(object sender, EventArgs e) { if (lblDiagNo.Text == "0") { btnDel.Visible = false; btnSave.Text = "save"; } else { btnDel.Visible = true; btnSave.Text = "update"; } if (lblDiagNo.Text != "0") { hbys_winApp.hisLib getData = new hisLib(); DataSet dataSet = getData.getDiagSingle(Int32.Parse(lblDiagNo.Text)); tbDiagnosis.Text = dataSet.Tables[0].Rows[0]["DiagName"].ToString(); } }
private void addDiagtoExam_Load(object sender, EventArgs e) { DataSet diagDataSet = new DataSet(); hbys_winApp.hisLib diagHisLib = new hisLib(); diagDataSet = diagHisLib.showDiagnosisList(); comboDiag.Items.Clear(); for (int i = 0; i < diagDataSet.Tables[0].Rows.Count; i++) { titleBoxItem diagBoxItem = new titleBoxItem(); diagBoxItem.Txt = diagDataSet.Tables[0].Rows[i]["Diagnosis Name"].ToString(); diagBoxItem.Val = diagDataSet.Tables[0].Rows[i]["Diagnosis No"].ToString(); comboDiag.Items.Add(diagBoxItem); } if (comboDiag.Items.Count > 0) { comboDiag.SelectedIndex = 0; } }
private void addSurvey2Exam_Load(object sender, EventArgs e) { DataSet surveyDataSet = new DataSet(); hbys_winApp.hisLib surveyHisLib = new hisLib(); surveyDataSet = surveyHisLib.showSurveyList(); comboSurvey.Items.Clear(); for (int i = 0; i < surveyDataSet.Tables[0].Rows.Count; i++) { titleBoxItem surveyBoxItem = new titleBoxItem(); surveyBoxItem.Txt = surveyDataSet.Tables[0].Rows[i]["SurveyName"].ToString(); surveyBoxItem.Val = surveyDataSet.Tables[0].Rows[i]["SurveyNo"].ToString(); comboSurvey.Items.Add(surveyBoxItem); } if (comboSurvey.Items.Count > 0) { comboSurvey.SelectedIndex = 0; } }
private void addServiceNameForm_Load(object sender, EventArgs e) { if (lblServiceNo.Text == "0") { btnDel.Visible = false; btnSave.Text = "Save"; } else { btnDel.Visible = true; btnSave.Text = "Update"; } if (lblServiceNo.Text != "0") { hbys_winApp.hisLib get = new hisLib(); DataSet ds = get.getSingleServiceName(Int32.Parse(lblServiceNo.Text)); tbAddService.Text = ds.Tables[0].Rows[0]["ServiceName"].ToString(); }//end save }
private void addTitleName_Load(object sender, EventArgs e) { if (lblTitleNo.Text == "0") { btnDelete.Visible = false; } else { btnDelete.Visible = true; } //**************************************** if (lblTitleNo.Text != "0") { hbys_winApp.hisLib getData = new hisLib(); DataSet ds = getData.getSingleTitleName(Int32.Parse(lblTitleNo.Text)); tbTitle.Text = ds.Tables[0].Rows[0]["TitleName"].ToString(); } }
private void addSurveyNames_Load(object sender, EventArgs e) { if (lblSurveyNo.Text == "0") { btnDelete.Visible = false; } else { btnDelete.Visible = true; } //**************************************** if (lblSurveyNo.Text != "0") { hbys_winApp.hisLib getData = new hisLib(); DataSet ds = getData.getSingleSurveyList(Int32.Parse(lblSurveyNo.Text)); tbSurvey.Text = ds.Tables[0].Rows[0]["SurveyName"].ToString(); }//end save }
private void addPatientDatasForm_Load(object sender, EventArgs e) { if (lblPatientNo.Text == "0") { btnDelete.Visible = false; } else { btnDelete.Visible = true; } //**************************************** if (lblPatientNo.Text != "0") { hbys_winApp.hisLib getData = new hisLib(); DataSet ds = getData.getSinglePatient(Int32.Parse(lblPatientNo.Text)); tbFn.Text = ds.Tables[0].Rows[0]["FName"].ToString(); tbLn.Text = ds.Tables[0].Rows[0]["SName"].ToString(); tbTc.Text = ds.Tables[0].Rows[0]["TCNo"].ToString(); } }