예제 #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 = grdViewTitle.RowCount;

                frmTitleDetail TitleDetailForm = new frmTitleDetail();

                TitleDetailForm.txtTitle.Tag = string.Empty;
                TitleDetailForm.txtTitle.Text = string.Empty;
                TitleDetailForm.cmdSave.Tag = "Add";
                TitleDetailForm.ShowDialog();

                BindingTitle();
            }
            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)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewTitle.RowCount;

                frmTitleDetail TitleDetailForm = new frmTitleDetail();

                TitleDetailForm.txtTitle.Tag  = string.Empty;
                TitleDetailForm.txtTitle.Text = string.Empty;
                TitleDetailForm.cmdSave.Tag   = "Add";
                TitleDetailForm.ShowDialog();

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

                frmTitleDetail TitleDetailForm = new frmTitleDetail();

                TitleDetailForm.txtTitle.Tag          = drTitle.ItemArray[0].ToString();
                TitleDetailForm.txtTitle.Text         = drTitle.ItemArray[1].ToString();
                TitleDetailForm.chkIsActive.EditValue = bool.Parse(drTitle.ItemArray[2].ToString());
                TitleDetailForm.cmdSave.Tag           = "Edit";

                TitleDetailForm.ShowDialog();

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

                frmTitleDetail TitleDetailForm = new frmTitleDetail();

                TitleDetailForm.txtTitle.Tag = drTitle.ItemArray[0].ToString();
                TitleDetailForm.txtTitle.Text = drTitle.ItemArray[1].ToString();
                TitleDetailForm.chkIsActive.EditValue = bool.Parse(drTitle.ItemArray[2].ToString());
                TitleDetailForm.cmdSave.Tag = "Edit";

                TitleDetailForm.ShowDialog();

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