private void ShowProceduresHistory(int index) { try { dgvApptHistory.Rows[index].Selected = true; int app_id = Convert.ToInt32(dgvApptHistory.Rows[index].Cells["colHistID"].Value); lblHeadProcHist.Text = "PROCEDURES ON " + Utils.FormatDateShort(dgvApptHistory.Rows[index].Cells["colHistDate"].Value.ToString()); dgvHistoryProcedures.DataSource = objCD.getProceduresFromApptID(app_id); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void ShowInvestigationsHistory(int index) { try { dgvApptHistory.Rows[index].Selected = true; int app_id = Convert.ToInt32(dgvApptHistory.Rows[index].Cells["colHistID"].Value); lblHeadInvesHist.Text = "INVESTIGATIONS ON " + Utils.FormatDateShort(dgvApptHistory.Rows[index].Cells["colHistDate"].Value.ToString()); dgvHistoryInvestigations.DataSource = objCD.getInvestigationsFromApptID(app_id); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void setFormFields(int index) { try { txtName.Text = dgvList.Rows[index].Cells["colName"].Value.ToString(); txtID.Text = dgvList.Rows[index].Cells["colID"].Value.ToString(); txtDesc.Text = dgvList.Rows[index].Cells["colDesc"].Value.ToString(); txtVal.Text = dgvList.Rows[index].Cells["colVal"].Value.ToString(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void frmConsultationHistory_FormClosing(object sender, FormClosingEventArgs e) { try { frmConsultationDetails frm = new frmConsultationDetails(1, 2); frm.MdiParent = this.Owner; frm.WindowState = FormWindowState.Maximized; frm.Show(); } catch (Exception ex) { CommonLogger.Info("frmConsultationDetails\r\n" + ex.ToString()); } }
private void findDateDiff() { try { DateTime tDate1 = dtFrom.Value; DateTime tDate2 = dtTo.Value; TimeSpan tspan = tDate2 - tDate1; txtDays.Text = tspan.Days.ToString(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
public void GetInterviewResults() { //int interview_id = Convert.ToInt32(Request.QueryString["interview_id"]); try { var url = string.Format("api/Interviews/GetResults?employer_id=" + employer_id.Value + "&job_id=" + job_id.Value + "&interview_id=" + interview_id.Value); DataTable dt = wHelper.GetDataTableFromWebApi(url); resultList = dt.AsEnumerable().ToList(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnAddNewProcedure_Click(object sender, EventArgs e) { try { frmProcedures fp = new frmProcedures(600, 500); //fp.MdiParent = this.MdiParent; fp.ShowDialog(this); cmbProcedure.DataSource = objCD.ProceduresCombo(0); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void SelectPatient(string pid, string pnum) { try { txtPatientID.Text = pid; txtPatNum.Text = pnum; MessageBox.Show("Please select the Doctor"); cmbDoc.Focus(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void clearMedFormFields() { try { txtAppMedId.Text = ""; cmbMedicine.SelectedIndex = 0; txtPrescription.Text = ""; txtType.Text = ""; } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnInvAdd_Click(object sender, EventArgs e) { try { frmInvestigations fp = new frmInvestigations(600, 500); //fp.MdiParent = this.MdiParent; fp.ShowDialog(this); cmbInvestigation.DataSource = objCD.InvestigationsCombo(0); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnSaveMedicine_Click(object sender, EventArgs e) { try { if (ValidateChildren(ValidationConstraints.Enabled)) { int rtn = -1; if (txtAppMedId.Text.Trim() == "") //add data { rtn = objMed.addMedicines(Convert.ToInt32(txtPatientID.Text), Convert.ToInt32(txtDoctorID.Text), Convert.ToInt32(txtAppID.Text), Convert.ToInt32(cmbMedicine.SelectedValue.ToString()), txtPrescription.Text.Trim()); if (rtn == -1) { ShowStatus(0, "Some error occurred... Record cannot be added!"); } else if (rtn == 0) { ShowStatus(0, "Name must be unique!"); } else if (rtn == 1) { //ShowStatus(1, "Record successfully added!"); clearMedFormFields(); getMedicineList(); } } else //edit record { rtn = objMed.editMedicines(Convert.ToInt32(txtAppMedId.Text.Trim()), Convert.ToInt32(txtPatientID.Text), Convert.ToInt32(txtDoctorID.Text), Convert.ToInt32(txtAppID.Text), Convert.ToInt32(cmbMedicine.SelectedValue.ToString()), txtPrescription.Text.Trim()); if (rtn == 0) { ShowStatus(0, "This name already exists. Please provide unique name!"); } else if (rtn == 1) { //ShowStatus(1, "Record successfully updated!"); clearMedFormFields(); getMedicineList(); } else if (rtn == -1) { ShowStatus(0, "Some error occurred... Record cannot be added!"); } } } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
public frmAppointmentBill(int app_id, int pat_id) { try { InitializeComponent(); appointment_id = app_id; patient_id = pat_id; PopulateBillTypes(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
public IReadOnlyCollection <Publicity> GetAll() { try { var chanel = CreateChannel(); List <Publicity> publicityList = ConvertToPublicityWcfList(chanel.GetPublicityList()); return(publicityList); } catch (Exception) { _commonLogger.Info("Problem in PublicityRepository/GetPublicityList"); throw; } }
private void frmOptions_Load(object sender, EventArgs e) { try { dgvList.AutoGenerateColumns = false; this.WindowState = FormWindowState.Maximized; PopulateSearch(); this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnList_Click(object sender, EventArgs e) { try { if (startload == 1) { getAppointmentList(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void cmbActive_SelectedIndexChanged(object sender, EventArgs e) { try { if (cmbActive.Visible == true && cmbSearch.SelectedValue.ToString() == "active") { txtSearch.Text = cmbActive.SelectedValue.ToString(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void setFormFields(int index) { try { txtID.Text = dgvList.Rows[index].Cells["colID"].Value.ToString(); txtName.Text = dgvList.Rows[index].Cells["colName"].Value.ToString(); txtDesc.Text = dgvList.Rows[index].Cells["colDescription"].Value.ToString(); chkActive.Checked = (bool)dgvList.Rows[index].Cells["colActive"].Value; } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void frmDepartments_Load(object sender, EventArgs e) { try { this.WindowState = FormWindowState.Maximized; this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; dgvDept.AutoGenerateColumns = false; this.MaximizeBox = true; } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void frmConsultations_Activated(object sender, EventArgs e) { try { if (startload == 1) { getAppointmentList(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void cmbStatus_SelectedIndexChanged(object sender, EventArgs e) { try { if (startload == 1) { getAppointmentList(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void dtpAppDate_ValueChanged(object sender, EventArgs e) { try { if (startload == 1) { getAppointmentList(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void txtPwd_KeyPress(object sender, KeyPressEventArgs e) { try { if (e.KeyChar == (char)13) { submitLogin(); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
/// <summary> /// Updates user role /// </summary> private void UpdateUserRole() { string userCode; string roleCode; TreeNodeCollection nodes = UserRoleDetails_tv.Nodes; UserRoleVo userRoleCheckVo = new UserRoleVo(); try { userRoleCheckVo = (UserRoleVo)base.InvokeCbm(new GetUserRoleMasterMntCbm(), new UserRoleVo(), false); } catch (Framework.ApplicationException exception) { popUpMessage.ApplicationError(exception.GetMessageData(), Text); Logger.Error(exception.GetMessageData()); return; } foreach (TreeNode tn in nodes) { foreach (TreeNode child in tn.Nodes) { userCode = tn.Tag.ToString(); roleCode = child.Tag.ToString(); var userRoleCount = userRoleCheckVo.UserRoleListVo.Count(t => t.UserCode == userCode && t.RoleCode == roleCode); if (child.Checked) { if (userRoleCount == 0) { AddUserRole(userCode, roleCode); } } else { if (userRoleCount == 1) { DeleteUserRole(userCode, roleCode); } } } } messageData = new MessageData("mmci00002", Properties.Resources.mmci00002, null); Logger.Info(messageData); popUpMessage.Information(messageData, Text); }
private void cmbProcedure_SelectedIndexChanged(object sender, EventArgs e) { try { if (txtApptProcID.Text == "") //load fees from procedure table { txtFee.Text = objCD.getProcedureFees(Convert.ToInt32(cmbProcedure.SelectedValue.ToString())); } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void btnSave_Click(object sender, EventArgs e) { int rtn = -1; try { if (ValidateChildren(ValidationConstraints.Enabled)) { if (txtID.Text.Trim() == "") //add data { rtn = dt.addTypes(txtName.Text, txtDesc.Text, chkActive.Checked); if (rtn == 0) { ShowStatus(0, "Type name should be unique"); } else if (rtn == 1) { ShowStatus(1, "Record succesfully added"); clearFormFields(); } else if (rtn == -1) { ShowStatus(0, "Some error occurred... Record cannot be added."); } } else //edit record { rtn = dt.editTypes(Int32.Parse(txtID.Text.Trim()), txtName.Text, txtDesc.Text, chkActive.Checked); if (rtn == 0) { ShowStatus(0, "This name already exists. Please provide unique name."); } else if (rtn == 1) { ShowStatus(1, "Record succesfully updated"); clearFormFields(); } else if (rtn == -1) { ShowStatus(0, "Some error occurred... Record cannot be added."); } } } } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void LoadProcessWorkListBox() { isProcessListLoading = true; ProcessWorkVo outPwVo = (ProcessWorkVo)DefaultCbmInvoker.Invoke(new GetProcessWorkMasterMntCbm(), new ProcessWorkVo()); if (outPwVo.ProcessWorkListVo.Count > 0) { outPwVo.ProcessWorkListVo.ForEach(p => p.ProcessWorkName = p.ProcessWorkCode + " " + p.ProcessWorkName); ProcessWork_lst.DataSource = outPwVo.ProcessWorkListVo; ProcessWork_lst.DisplayMember = "ProcessWorkName"; ProcessWork_lst.ValueMember = "ProcessWorkId"; ProcessWork_lst.SelectedIndex = -1; isProcessListLoading = false; Update_btn.Enabled = true; } else { messageData = new MessageData("mmci00006", Properties.Resources.mmci00006, ProcessWork_lbl.Text); logger.Info(messageData); popUpMessage.Information(messageData, Text); Update_btn.Enabled = false; } }
private void clearFormFields() { try { txtName.Text = ""; txtDesc.Text = ""; chkActive.Checked = true; txtID.Text = ""; //PopulateProcTypeCombo(0); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void GetSkills() { try { var url = string.Format("api/Skills/Get?srchBy=" + srchBy.Value + "&srchVal=" + srchVal.Value + "&PageSize=" + pager1.PageSize + "&CurrentPage=" + pager1.CurrentIndex); DataSet ds = wHelper.GetDataSetFromWebApi(url); skillList.DataSource = ds.Tables[0]; skillList.DataBind(); pager1.ItemCount = Convert.ToDouble(ds.Tables[1].Rows[0][0]); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void frmProcedures_FormClosed(object sender, FormClosedEventArgs e) { try { if (this.IsMdiChild) { Utils.toggleChildCloseButton(this.MdiParent, 1); } procTest.Dispose(); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }
private void printDocument1_PrintPage(object sender, PrintPageEventArgs e) { try { Bitmap bmp = new Bitmap(panelContent.Width, panelContent.Height, panelContent.CreateGraphics()); panelContent.DrawToBitmap(bmp, new Rectangle(0, 0, panelContent.Width, panelContent.Height)); RectangleF bounds = e.PageSettings.PrintableArea; float factor = ((float)bmp.Height / (float)bmp.Width); e.Graphics.DrawImage(bmp, bounds.Left, bounds.Top, bounds.Width, factor * bounds.Width); } catch (Exception ex) { CommonLogger.Info(ex.ToString()); } }