コード例 #1
0
 public PatientProcedureForm(Patient obj)
     : base(obj, false)
 {
     this.mPatient = obj;
     this.mPatientProcedureCollection = new PatientProcedures(obj.ObjectGuid);
     this.mEntry = new PatientProcedure();
     this.InitializeComponent();
     this.UserInitialize();
 }
コード例 #2
0
        private PatientProcedure GetSelectedProcedure(DataGridView dgv)
        {
            PatientProcedure obj = null;

            if (dgv != null && dgv.CurrentRow != null)
            {
                obj = dgv.CurrentRow.Tag as PatientProcedure;
            }
            return(obj);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        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));
            }
        }
コード例 #7
0
        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));
            }
        }
コード例 #8
0
        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();
        }