Beispiel #1
0
        private void cmdNew_Click(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewFrequency.RowCount;

                frmFrequencyDetail FrequencyDetailForm = new frmFrequencyDetail();

                FrequencyDetailForm.txtFrequency.Tag     = string.Empty;
                FrequencyDetailForm.txtFrequency.Text    = string.Empty;
                FrequencyDetailForm.cboTreatmentType.Tag = string.Empty;
                FrequencyDetailForm.cmdSave.Tag          = "Add";
                FrequencyDetailForm.ShowDialog();

                BindingFrequency();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #2
0
        private void cmdNew_Click(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewFrequency.RowCount;

                frmFrequencyDetail FrequencyDetailForm = new frmFrequencyDetail();

                FrequencyDetailForm.txtFrequency.Tag = string.Empty;
                FrequencyDetailForm.txtFrequency.Text = string.Empty;
                FrequencyDetailForm.cboTreatmentType.Tag = string.Empty;
                FrequencyDetailForm.cmdSave.Tag = "Add";
                FrequencyDetailForm.ShowDialog();

                BindingFrequency();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #3
0
        private void Edit()
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsEdit") == true)
            {
                curIndex = grdViewFrequency.GetDataSourceRowIndex(grdViewFrequency.FocusedRowHandle);

                frmFrequencyDetail FrequencyDetailForm = new frmFrequencyDetail();

                FrequencyDetailForm.txtFrequency.Tag      = drFrequency.ItemArray[0].ToString();
                FrequencyDetailForm.txtFrequency.Text     = drFrequency.ItemArray[1].ToString();
                FrequencyDetailForm.cboTreatmentType.Tag  = drFrequency.ItemArray[4].ToString();
                FrequencyDetailForm.chkIsActive.EditValue = bool.Parse(drFrequency.ItemArray[3].ToString());
                FrequencyDetailForm.cmdSave.Tag           = "Edit";

                FrequencyDetailForm.ShowDialog();

                BindingFrequency();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #4
0
        private void Edit()
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsEdit") == true)
            {
                curIndex = grdViewFrequency.GetDataSourceRowIndex(grdViewFrequency.FocusedRowHandle);

                frmFrequencyDetail FrequencyDetailForm = new frmFrequencyDetail();

                FrequencyDetailForm.txtFrequency.Tag = drFrequency.ItemArray[0].ToString();
                FrequencyDetailForm.txtFrequency.Text = drFrequency.ItemArray[1].ToString();
                FrequencyDetailForm.cboTreatmentType.Tag = drFrequency.ItemArray[4].ToString();
                FrequencyDetailForm.chkIsActive.EditValue = bool.Parse(drFrequency.ItemArray[3].ToString());
                FrequencyDetailForm.cmdSave.Tag = "Edit";

                FrequencyDetailForm.ShowDialog();

                BindingFrequency();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }