Exemplo n.º 1
0
        private void cmdCreate_Click(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewUser.RowCount;

                frmUserDetail UserDetailForm = new frmUserDetail();

                UserDetailForm.txtLoginID.Tag = string.Empty;
                UserDetailForm.cmdSave.Tag    = "Add";

                UserDetailForm.ShowDialog();

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

                frmUserDetail UserDetailForm = new frmUserDetail();

                UserDetailForm.txtLoginID.Tag = string.Empty;
                UserDetailForm.cmdSave.Tag = "Add";

                UserDetailForm.ShowDialog();

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

                frmUserDetail UserDetailForm = new frmUserDetail();

                UserDetailForm.txtLoginID.Tag        = drUser.ItemArray[0].ToString();
                UserDetailForm.txtFullName.Text      = drUser.ItemArray[1].ToString();
                UserDetailForm.txtLoginID.Text       = drUser.ItemArray[2].ToString();
                UserDetailForm.cboUserLevel.Tag      = drUser.ItemArray[5].ToString();
                UserDetailForm.chkIsActive.EditValue = bool.Parse(drUser.ItemArray[10].ToString());
                UserDetailForm.cmdSave.Tag           = "Edit";

                UserDetailForm.ShowDialog();

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

                frmUserDetail UserDetailForm = new frmUserDetail();

                UserDetailForm.txtLoginID.Tag = drUser.ItemArray[0].ToString();
                UserDetailForm.txtFullName.Text = drUser.ItemArray[1].ToString();
                UserDetailForm.txtLoginID.Text = drUser.ItemArray[2].ToString();
                UserDetailForm.cboUserLevel.Tag = drUser.ItemArray[5].ToString();
                UserDetailForm.chkIsActive.EditValue = bool.Parse(drUser.ItemArray[10].ToString());
                UserDetailForm.cmdSave.Tag = "Edit";

                UserDetailForm.ShowDialog();

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