Example #1
0
        private void Edit()
        {
            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsEdit") == true)
            {
                curIndex = grdView.GetDataSourceRowIndex(grdView.FocusedRowHandle);

                frmLabAgent detailForm = new frmLabAgent();

                detailForm.txtName.Tag = dr["agentPK"].ToString();
                detailForm.txtName.Text = dr["agentName"].ToString();
                detailForm.txtPhone.Text = dr["agentPhone"].ToString();
                detailForm.txtAddress.Text = dr["agentAddress"].ToString();
                detailForm.txtRemarks.Text = dr["agentRemarks"].ToString();

                detailForm.chkIsActive.EditValue = true;
                detailForm.cmdSave.Tag = "Edit";

                detailForm.ShowDialog();

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

                frmLabAgent detailForm = new frmLabAgent();

                detailForm.txtName.Tag     = dr["agentPK"].ToString();
                detailForm.txtName.Text    = dr["agentName"].ToString();
                detailForm.txtPhone.Text   = dr["agentPhone"].ToString();
                detailForm.txtAddress.Text = dr["agentAddress"].ToString();
                detailForm.txtRemarks.Text = dr["agentRemarks"].ToString();

                detailForm.chkIsActive.EditValue = true;
                detailForm.cmdSave.Tag           = "Edit";

                detailForm.ShowDialog();

                Binding();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #3
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 = grdView.RowCount;

                frmLabAgent detailForm = new frmLabAgent();

                detailForm.txtName.Tag  = string.Empty;
                detailForm.txtName.Text = string.Empty;
                detailForm.cmdSave.Tag  = "Add";
                detailForm.ShowDialog();

                Binding();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Example #4
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 = grdView.RowCount;

                frmLabAgent detailForm = new frmLabAgent();

                detailForm.txtName.Tag = string.Empty;
                detailForm.txtName.Text = string.Empty;
                detailForm.cmdSave.Tag = "Add";
                detailForm.ShowDialog();

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