Example #1
0
        private void BindDataZone2()
        {
            //noina add
            HidenButtonLab();

            try
            {
                PatientAssHdrbindingSource1.DataSource = (from t1 in dbc.trn_patient_ass_hdrs
                                                          where t1.trn_patient_ass_grp.tpr_id == ptpr_id
                                                          select t1);
                if (LabNo != "")
                {
                    int icount = 0;
                    int total  = PatientAssHdrbindingSource1.Count;
                    ewewe : trn_patient_ass_hdr currentdata = (trn_patient_ass_hdr)PatientAssHdrbindingSource1.Current;
                    if (currentdata.tpeh_order_code != LabNo)
                    {
                        icount = icount + 1;
                        PatientAssHdrbindingSource1.MoveNext();
                        if (total == icount)
                        {
                        }
                        else
                        {
                            goto ewewe;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Program.MessageError(this.Name, "BindDataZone2", ex, false);
            }
        }
Example #2
0
        private void btnSaveAsDraft_Click(object sender, EventArgs e)
        {
            try
            {
                trn_patient_ass_hdr currenthdr = (trn_patient_ass_hdr)PatientAssHdrbindingSource1.Current;
                currenthdr.tpeh_summary = Program.GetValueRadioTochar(panelSummary);

                PatientAssHdrbindingSource1.EndEdit();
                dbc.SubmitChanges();
                lbAlertMsg.Text = "Save data completed.";
            }
            catch (Exception ex)
            {
                Program.MessageError(this.Name, "btnSaveAsDraft_Click", ex, false);
            }
        }
Example #3
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     lbAlertMsg.Text = "";
     panelSummary.Focus();
     if (dbc.GetChangeSet().Updates.Count > 0)
     {
         if (MessageBox.Show("Do you want save change data?", "Confirm Save Data", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             PatientAssHdrbindingSource1.EndEdit();
             dbc.SubmitChanges();
         }
         else
         {
             PatientAssHdrbindingSource1.CancelEdit();
             dbc = null;
             dbc = new InhCheckupDataContext();
             PatientAssHdrbindingSource1.DataSource = (from t1 in dbc.trn_patient_ass_hdrs
                                                       where t1.trn_patient_ass_grp.tpr_id == ptpr_id
                                                       select t1);
         }
     }
     PatientAssHdrbindingSource1.MoveNext();
 }