示例#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;

                frmLabPackageDetail LabDetailForm = new frmLabPackageDetail();

                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);
            }
        }
示例#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);

                frmLabPackageDetail LabDetailForm = new frmLabPackageDetail();

                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);
            }
        }
示例#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);

                frmLabPackageDetail LabDetailForm = new frmLabPackageDetail();

                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);
            }
        }
示例#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;

                frmLabPackageDetail LabDetailForm = new frmLabPackageDetail();

                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);
            }
        }