コード例 #1
0
        private void cmdNew_Click(object sender, EventArgs e)
        {
            curIndex = grdViewPatient.RowCount;

            if (SqlDb.IsAllow(AppVariable.CURRENT_SUB_MENU, AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsInsert") == true)
            {
                curIndex = grdViewPatient.RowCount;

                frmPatientDetail PatientDetailForm = new frmPatientDetail();

                PatientDetailForm.cmdSave.Tag = "Add";
                PatientDetailForm.ShowDialog();

                BindingPatient();

                if (grdViewPatient.RowCount > 0)
                {
                    drPatient = grdViewPatient.GetDataRow(grdViewPatient.FocusedRowHandle);
                }
            }
            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 = grdView.GetDataSourceRowIndex(grdView.FocusedRowHandle);

                frmManufacturerDetail detailForm = new frmManufacturerDetail();

                detailForm.txtName.Tag           = dr.ItemArray[0].ToString();
                detailForm.txtName.Text          = dr.ItemArray[1].ToString();
                detailForm.txtContact.Text       = dr.ItemArray[2].ToString();
                detailForm.txtAddress.Text       = dr.ItemArray[3].ToString();
                detailForm.txtEmail.Text         = dr.ItemArray[4].ToString();
                detailForm.cboCountry.Text       = dr.ItemArray[5].ToString();
                detailForm.chkIsActive.EditValue = bool.Parse(dr.ItemArray[6].ToString());
                detailForm.cmdSave.Tag           = "Edit";

                detailForm.ShowDialog();

                Binding();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #3
0
ファイル: frmLabAgents.cs プロジェクト: abdojobs/medipro
        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);
            }
        }
コード例 #4
0
ファイル: frmStartup.cs プロジェクト: abdojobs/medipro
        private void cmdUser_Click(object sender, EventArgs e)
        {
            if (SqlDb.IsAllow(cmdUser.Tag.ToString(), AppVariable.CURRENT_USER_LEVEL_ID.ToString(), "IsView") == true)
            {
                AppVariable.CURRENT_SUB_MENU = cmdUser.Tag.ToString();

                //frmUser UserForm = new frmUser();
                //UserForm.Show();
                ////UserForm.TopMost = true;

                sysLogs.logsDetail(int.Parse(AppVariable.CURRENT_SUB_MENU), "Viewing User Info.");
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #5
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 = grdViewSpecialize.RowCount;

                frmSpecializeDetail SpecializeDetailForm = new frmSpecializeDetail();

                SpecializeDetailForm.txtSpecialize.Tag  = string.Empty;
                SpecializeDetailForm.txtSpecialize.Text = string.Empty;
                SpecializeDetailForm.cmdSave.Tag        = "Add";
                SpecializeDetailForm.ShowDialog();

                BindingSpecialize();
            }
            else
            {
                MessageBox.Show("Sorry, Administrator is not allow this action?", "MediPro :: Clinic System", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #6
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);
            }
        }