示例#1
0
        private void cmdNew_Click(object sender, EventArgs e)
        {
            curIndex = grdViewPatient.RowCount;

            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewPatient.RowCount;

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                PatientDetailForm.cmdSave.Tag = "Add";
                PatientDetailForm.ShowDialog();

                BindingPatient();

                if (grdViewPatient.RowCount > 0)
                {
                    drPatient = grdViewPatient.GetDataRow(grdViewPatient.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
示例#2
0
        private void cmdNew_Click(object sender, EventArgs e)
        {
            curIndex = grdViewPatient.RowCount;

            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewPatient.RowCount;

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                PatientDetailForm.cmdSave.Tag = "Add";
                PatientDetailForm.ShowDialog();

                BindingPatient();

                if (grdViewPatient.RowCount > 0)
                {
                    drPatient = grdViewPatient.GetDataRow(grdViewPatient.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
示例#3
0
        private void grdViewPatient_DoubleClick(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsEdit") == true)
            {
                curIndex = grdViewPatient.GetDataSourceRowIndex(grdViewPatient.FocusedRowHandle);

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                PatientDetailForm.cmdSave.Tag = "Edit";

                PatientDetailForm.dteRegDate.Properties.ReadOnly = true;
                DateTime regDate = DateTime.Parse(drPatient.ItemArray[9].ToString());
                PatientDetailForm.dteRegDate.EditValue = regDate.ToShortDateString();

                PatientDetailForm.txtRegNo.Text      = drPatient.ItemArray[0].ToString();
                PatientDetailForm.txtName.Text       = drPatient.ItemArray[10].ToString();
                PatientDetailForm.cboTitle.Tag       = drPatient.ItemArray[11].ToString();
                PatientDetailForm.txtFatherName.Text = drPatient.ItemArray[4].ToString();
                PatientDetailForm.txtNRC.Text        = drPatient.ItemArray[2].ToString();
                PatientDetailForm.txtContactNo.Text  = drPatient.ItemArray[7].ToString();
                //PatientDetailForm.txtAge.Text = Helper.CalAge(DateTime.Parse(drPatient.ItemArray[5].ToString()));

                DateTime dobDate = DateTime.Parse(drPatient.ItemArray[5].ToString());
                PatientDetailForm.dteDOB.EditValue = dobDate.ToShortDateString();
                PatientDetailForm.txtAge.Text      = Helper.CalAge(dobDate);
                PatientDetailForm.cboGender.Text   = drPatient.ItemArray[3].ToString();
                PatientDetailForm.txtEmail.Text    = drPatient.ItemArray[8].ToString();
                PatientDetailForm.txtAddress.Text  = drPatient.ItemArray[7].ToString();

                PatientDetailForm.ShowDialog();

                sysLogs.logsDetail(int.Parse(AppVariable.CURRENT_SUB_MENU.ToString()), "Edit Patient Info.");

                BindingPatient();

                if (grdViewPatient.RowCount > 0)
                {
                    drPatient = grdViewPatient.GetDataRow(grdViewPatient.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
示例#4
0
        private void cmdPatientRegister_Click(object sender, EventArgs e)
        {
            curVisitedIndex = grdViewTodayVisitPatients.GetDataSourceRowIndex(grdViewTodayVisitPatients.FocusedRowHandle);

            if (SqlDb.IsAllow(cmdPatients.Tag.ToString(), AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                AppVariable.CURRENT_SUB_MENU = cmdPatients.Tag.ToString();

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                if (drTodayVisit.ItemArray[9].ToString() == "False")
                {
                    if (grdViewTodayVisitPatients.RowCount > 0)
                    {
                        PatientDetailForm.cmdSave.Tag = "Booked";
                        PatientDetailForm.txtName.Text = drTodayVisit.ItemArray[1].ToString();
                        PatientDetailForm.txtName.Tag = drTodayVisit.ItemArray[0].ToString();
                    }
                }
                else
                {
                    PatientDetailForm.cmdSave.Tag = "Add";
                }

                PatientDetailForm.ShowDialog();

                BindingVisiting();

                if (grdViewTodayVisitPatients.RowCount > 0)
                {
                    drTodayVisit = grdViewTodayVisitPatients.GetDataRow(grdViewTodayVisitPatients.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
示例#5
0
        private void grdViewPatient_DoubleClick(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsEdit") == true)
            {
                curIndex = grdViewPatient.GetDataSourceRowIndex(grdViewPatient.FocusedRowHandle);

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                PatientDetailForm.cmdSave.Tag = "Edit";

                PatientDetailForm.dteRegDate.Properties.ReadOnly = true;
                DateTime regDate = DateTime.Parse(drPatient.ItemArray[9].ToString());
                PatientDetailForm.dteRegDate.EditValue = regDate.ToShortDateString();

                PatientDetailForm.txtRegNo.Text = drPatient.ItemArray[0].ToString();
                PatientDetailForm.txtName.Text = drPatient.ItemArray[10].ToString();
                PatientDetailForm.cboTitle.Tag = drPatient.ItemArray[11].ToString();
                PatientDetailForm.txtFatherName.Text = drPatient.ItemArray[4].ToString();
                PatientDetailForm.txtNRC.Text = drPatient.ItemArray[2].ToString();
                PatientDetailForm.txtContactNo.Text = drPatient.ItemArray[7].ToString();
                //PatientDetailForm.txtAge.Text = Helper.CalAge(DateTime.Parse(drPatient.ItemArray[5].ToString()));

                DateTime dobDate = DateTime.Parse(drPatient.ItemArray[5].ToString());
                PatientDetailForm.dteDOB.EditValue = dobDate.ToShortDateString();
                PatientDetailForm.txtAge.Text = Helper.CalAge(dobDate);
                PatientDetailForm.cboGender.Text = drPatient.ItemArray[3].ToString();
                PatientDetailForm.txtEmail.Text = drPatient.ItemArray[8].ToString();
                PatientDetailForm.txtAddress.Text = drPatient.ItemArray[7].ToString();

                PatientDetailForm.ShowDialog();

                sysLogs.logsDetail(int.Parse(AppVariable.CURRENT_SUB_MENU.ToString()), "Edit Patient Info.");

                BindingPatient();

                if (grdViewPatient.RowCount > 0)
                {
                    drPatient = grdViewPatient.GetDataRow(grdViewPatient.FocusedRowHandle);
                }
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }