private void GV_Null_Result_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { dbc.Connection.Close(); dbc = new InhCheckupDataContext(); Clearfrm(); SetTprID = Convert1.ToInt32(GV_Null_Result["Coltprid", e.RowIndex].Value); SetEN = Convert1.ToString(GV_Null_Result["EN", e.RowIndex].Value); CurrentRegis = (from t1 in dbc.trn_patient_regis where t1.tpr_id == SetTprID select t1).FirstOrDefault(); Program.CurrentRegis = CurrentRegis; if (CurrentRegis != null) { UIProfileHorizontal1.Loaddata(SetTprID, Program.CurrentSite.mhs_id); //new code// this.subjectiveUC1.PatientRegis = CurrentRegis; this.objectiveUC1.PatientRegis = CurrentRegis; this.tabAssessmentAndPlanUC1.PatientRegis = CurrentRegis; if (tabControl1.SelectedTab.Tag.ToString() != "1") { tabControl1.SelectedIndex = 0; } btnSaveDraft.Enabled = true; btnSendAuto.Enabled = true; } } }
private void frmFaceSheet_Load(object sender, EventArgs e) { this.Text = Program.GetRoomName(); GvQuestionaire.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing; GvQuestionaire.ColumnHeadersHeight = GvQuestionaire.ColumnHeadersHeight * 2; GvQuestionaire.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter; this.LoadHistoryCheckup(); this.LoadAppointment(); this.LoadQuestionaire(); this.LoadDiagnosis(); this.LoadGraphBasicMeasurement(); this.LoadLabAll(); UIProfileHorizontal1.Loaddata(); }
private void SetUIProfileHorizontal1() { if (GV_Null_Result.RowCount > 0) { SetTprID = Convert1.ToInt32(GV_Null_Result["Coltprid", 0].Value); SetEN = Convert1.ToString(GV_Null_Result["EN", 0].Value); CurrentRegis = (from t1 in dbc.trn_patient_regis where t1.tpr_id == SetTprID select t1).FirstOrDefault(); if (CurrentRegis != null) { UIProfileHorizontal1.Loaddata(SetTprID, Program.CurrentSite.mhs_id); //this.LoadData(); this.subjectiveUC1.PatientRegis = CurrentRegis; this.objectiveUC1.PatientRegis = CurrentRegis; this.tabAssessmentAndPlanUC1.PatientRegis = CurrentRegis; } } }
//Grid Event private void GridResult_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex != -1) { string HNno = Convert1.ToString(GridResult["ColHN", e.RowIndex].Value); string En = Convert1.ToString(GridResult["Colen", e.RowIndex].Value); if (HNno != "") { btnSave.Enabled = true; btnClear.Enabled = true; btnPreview.Enabled = true; var objCurrentHN = (from t1 in dbc.trn_pfts where t1.trn_patient_regi.trn_patient.tpt_hn_no == HNno select t1).FirstOrDefault(); PFTbindingSource1.DataSource = objCurrentHN; if (objCurrentHN != null) { int tpr_id = objCurrentHN.tpr_id; UIProfileHorizontal1.Loaddata(tpr_id, objCurrentHN.trn_patient_regi.mhs_id);// Load Profile var objcurrentQuestionPatient = (from t1 in dbc.trn_ques_patients where t1.tpr_id == tpr_id select t1).FirstOrDefault(); QestionPatientbindingSource1.DataSource = objcurrentQuestionPatient; #region WaitingConfirm ////Load image HistoryData.showform = 'N'; //docscan.GetHistory("LR102", "", 4434); docscan.GetHistory("LR102", En, tpr_id); pictureBox_result.SizeMode = PictureBoxSizeMode.AutoSize; pictureBox_result.Image = docscan.resizeImage(HistoryData.newImage, new Size(450, 500)); if (pictureBox_result.Image == null) { btnSend.Enabled = false; btnPreview.Enabled = false; } else { btnSend.Enabled = true; btnPreview.Enabled = true; } ////EndLoad image // TestGetDocscan.ServiceSoapClient wsSaveDocscan = new TestGetDocscan.ServiceSoapClient(); //DataSet ds = new DataSet(); //ds = wsSaveDocscan.getDocumentList("0111006591", "O0113450939", "", "VVF", "A1"); //pictureBox_result.SizeMode = PictureBoxSizeMode.AutoSize; //pictureBox_result.Image = docscan.resizeImage(HistoryData.newImage, new Size(450, 500)); #endregion } } } } catch { return; } }