public override void ReLoadData(int ID) { db = atContext.CreateContext(); s_Department = db.ServiceDepartments.Where(x => x.id == ID).SingleOrDefault(); if (s_Department != null) { txtCode.Text = s_Department.DepartmentCode; txtName.Text = s_Department.DepartmentName; } }
private void FrmServiceInsuranceView_atInitialise() { try { db = atContext.CreateContext(); m_ServiceInsurance = new ServiceInsurance(); PrintButton.Visible = false; MaximizeButton.Visible = false; MinimizeButton.Visible = false; } catch (Exception ex) { ExceptionManager.Publish(ex); atMessageBox.Show(MessageKeys.MsgExceptionOccuredWhileIntialising); } }
private void ServiceDepartment_atInitialise() { try { db = atContext.CreateContext(); s_Department = new ServiceDepartment(); PrintButton.Visible = false; ShareButton.Visible = false; MaximizeButton.Visible = false; MinimizeButton.Visible = false; } catch (Exception ex) { ExceptionManager.Publish(ex); atMessageBox.Show(ex, ENOperation.Initialise); } }
private void ServiceDepartment_atNewClick(object source) { try { s_Department = new ServiceDepartment(); db = atContext.CreateContext(); GetSeqNo(); txtCode.Focus(); PopulateServiceDepartment(); } catch (Exception ex) { ExceptionManager.Publish(ex); atMessageBox.Show(ex, ENOperation.AfterInitialise); return; } }
public override void ReLoadData(int id) { try { db = atContext.CreateContext(); m_ServiceInsurance = db.ServiceInsurances.Where(x => x.id == id).SingleOrDefault(); if (m_ServiceInsurance != null) { txtInsuranceCode.Text = m_ServiceInsurance.InsuranceCode.ToString(); txtInsuranceName.Text = m_ServiceInsurance.InsuranceName.ToString(); txtDescription.Text = m_ServiceInsurance.Description.ToString(); cmbCompany.Text = m_ServiceInsurance.CompanyName.ToString(); } } catch (Exception ex) { ExceptionManager.Publish(ex); throw; } }
private void FrmServiceInsuranceView_atNewClick(object source) { try { m_ServiceInsurance = new ServiceInsurance(); db = atContext.CreateContext(); txtInsuranceCode.Focus(); FnClearAll(); PopulateCombos(); ShowToolTip(); PopulateServiceInsurance(); GetSeqNo(); } catch (Exception ex) { ExceptionManager.Publish(ex); atMessageBox.Show(ex, ENOperation.New); return; } }