public PatientProcedureForm(Patient obj) : base(obj, false) { this.mPatient = obj; this.mPatientProcedureCollection = new PatientProcedures(obj.ObjectGuid); this.mEntry = new PatientProcedure(); this.InitializeComponent(); this.UserInitialize(); }
private PatientProcedure GetSelectedProcedure(DataGridView dgv) { PatientProcedure obj = null; if (dgv != null && dgv.CurrentRow != null) { obj = dgv.CurrentRow.Tag as PatientProcedure; } return(obj); }
protected override void OnSaveComplete() { base.OnSaveComplete(); PatientProcedure obj = this.GetSelectedProcedure(this.dgvData); this.LoadPatientAllProcedure(obj); this.cmbProcedure.SelectedIndex = 0; this.nupAmount.ResetText(); this.txtNotes.ResetText(); this.mEntry = new PatientProcedure(); this.cmbProcedure.Focus(); }
private void OnOpenClick(object sender, EventArgs e) { PatientProcedure obj = this.GetSelectedProcedure(this.dgvData); if (obj != null) { this.mEntry = obj; this.cmbProcedure.SelectedItem = obj.Procedure; this.dtpProcedureDate.Value = obj.ProcedureDate; this.nupAmount.Value = obj.Amount; this.txtNotes.Text = obj.Notes; } }
protected override void OnDeleteClick() { PatientProcedure obj = this.GetSelectedProcedure(this.dgvData); if (obj != null) { this.mEntry = obj; this.mEntry.MarkToDelete(); this.mEntry.UpdateChanges(); } this.cmbProcedure.SelectedIndex = 0; this.nupAmount.Value = 0; this.txtNotes.ResetText(); this.dtpProcedureDate.Value = DateTime.Now; this.mEntry = new PatientProcedure(); this.cmbProcedure.Focus(); LoadPatientAllProcedure(GetSelectedProcedure(this.dgvData)); }
public async Task <HttpResponseMessage> AddPateintProcedure(PatientProcedure inputmodel) { string data = string.Empty; try { ApiResponseModel <string> model = new ApiResponseModel <string>() { }; var client = ServiceFactory.GetService(typeof(PatientProcedure)); data = await client.addPatientOrder(inputmodel); model.data.records = data; return(Response.Success <string>(model)); } catch (Exception ex) { return(Response.Exception(ex)); } }
public async Task <HttpResponseMessage> updatePateintProcedure(PatientProcedure patientProcedure) { bool data = false; try { ApiResponseModel <bool> model = new ApiResponseModel <bool>() { }; var client = ServiceFactory.GetService(typeof(PatientProcedure)); data = await client.updatePatientOrder(patientProcedure); model.data.records = data; return(Response.Success <bool>(model)); } catch (Exception ex) { return(Response.Exception(ex)); } }
private void LoadPatientAllProcedure(PatientProcedure selected) { int count = 0; decimal totalAmount = 0; decimal balanceToCollect = 0; this.LoadEntityList <PatientProcedure>(this.dgvData, this.clmId.Index, new PatientProcedures(this.mPatient.ObjectGuid), selected, false, true, delegate(DataGridViewRow row, PatientProcedure obj) { count++; row.Cells[this.clmId.Index].Value = obj.Id; row.Cells[this.clmProcedureDate.Index].Value = Common.DateToString(obj.ProcedureDate); row.Cells[this.clmProcedure.Index].Value = obj.ProcedureName; row.Cells[this.clmAmount.Index].Value = obj.Amount; row.Cells[this.clmNotes.Index].Value = obj.Notes; totalAmount = totalAmount + obj.Amount; } ); balanceToCollect = totalAmount; lblTotalAmountValue.Text = totalAmount.ToString(); lblBalanceToCollectValue.Text = balanceToCollect.ToString(); }