Example #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 = grdViewLaboratory.RowCount;

                frmLaboratoryDetail LabDetailForm = new frmLaboratoryDetail();

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

                BindingLab();
            }
            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 = grdViewLaboratory.GetDataSourceRowIndex(grdViewLaboratory.FocusedRowHandle);

                frmLaboratoryDetail LabDetailForm = new frmLaboratoryDetail();

                LabDetailForm.txtName.Tag = drLab.ItemArray[0].ToString();
                LabDetailForm.txtName.Text = drLab.ItemArray[1].ToString();
                LabDetailForm.chkIsActive.EditValue = bool.Parse(drLab.ItemArray[2].ToString());
                LabDetailForm.cmdSave.Tag = "Edit";

                LabDetailForm.ShowDialog();

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

                frmLaboratoryDetail LabDetailForm = new frmLaboratoryDetail();

                LabDetailForm.txtName.Tag           = drLab.ItemArray[0].ToString();
                LabDetailForm.txtName.Text          = drLab.ItemArray[1].ToString();
                LabDetailForm.chkIsActive.EditValue = bool.Parse(drLab.ItemArray[2].ToString());
                LabDetailForm.cmdSave.Tag           = "Edit";

                LabDetailForm.ShowDialog();

                BindingLab();
            }
            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 = grdViewLaboratory.RowCount;

                frmLaboratoryDetail LabDetailForm = new frmLaboratoryDetail();

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

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