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 = grdViewSpecialize.RowCount;

                frmSpecializeDetail SpecializeDetailForm = new frmSpecializeDetail();

                SpecializeDetailForm.txtSpecialize.Tag = string.Empty;
                SpecializeDetailForm.txtSpecialize.Text = string.Empty;
                SpecializeDetailForm.cmdSave.Tag = "Add";
                SpecializeDetailForm.ShowDialog();

                BindingSpecialize();
            }
            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 = grdViewSpecialize.RowCount;

                frmSpecializeDetail SpecializeDetailForm = new frmSpecializeDetail();

                SpecializeDetailForm.txtSpecialize.Tag  = string.Empty;
                SpecializeDetailForm.txtSpecialize.Text = string.Empty;
                SpecializeDetailForm.cmdSave.Tag        = "Add";
                SpecializeDetailForm.ShowDialog();

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

                frmSpecializeDetail SpecializeDetailForm = new frmSpecializeDetail();

                SpecializeDetailForm.txtSpecialize.Tag     = drSpecialize.ItemArray[0].ToString();
                SpecializeDetailForm.txtSpecialize.Text    = drSpecialize.ItemArray[1].ToString();
                SpecializeDetailForm.chkIsActive.EditValue = bool.Parse(drSpecialize.ItemArray[2].ToString());
                SpecializeDetailForm.cmdSave.Tag           = "Edit";

                SpecializeDetailForm.ShowDialog();

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

                frmSpecializeDetail SpecializeDetailForm = new frmSpecializeDetail();

                SpecializeDetailForm.txtSpecialize.Tag = drSpecialize.ItemArray[0].ToString();
                SpecializeDetailForm.txtSpecialize.Text = drSpecialize.ItemArray[1].ToString();
                SpecializeDetailForm.chkIsActive.EditValue = bool.Parse(drSpecialize.ItemArray[2].ToString());
                SpecializeDetailForm.cmdSave.Tag = "Edit";

                SpecializeDetailForm.ShowDialog();

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