private void ChkPermission()
        {
            _session.ChkPermission(MainWindow.userName);

            if (_session.SavePermission == true && _session.EditPermission == false &&
                _session.DeletePermission == false)
            {
                Patient_buttonEnable(true);
            }
            if (_session.SavePermission == true && _session.EditPermission == true &&
                _session.DeletePermission == false)
            {
                Patient_buttonEnable(true);
                btnOTEdit.Enabled = true;
            }
            if (_session.SavePermission == true && _session.EditPermission == false &&
                _session.DeletePermission == true)
            {
                Patient_buttonEnable(true);
                gridView1.Columns["Remove"].Visible = true;
            }
            if (_session.SavePermission == false && _session.EditPermission == true &&
                _session.DeletePermission == false)
            {
                Patient_buttonEnable(false);
                gridView1.Columns["Remove"].Visible = false;
            }
        }
Exemple #2
0
 private void chkPermission()
 {
     _session.ChkPermission(MainWindow.userName);
     if (_session.SavePermission == true && _session.EditPermission == true && _session.DeletePermission == true)
     {
         Patient_buttonEnable(false);
         Consult_buttonEnable(false);
         IssueMedcine_buttonEnable(false);
         Pathology_buttonEnable(false);
         btnSavePSBill.Enabled        = true;
         btnSavePathology.Enabled     = true;
         btnSaveIssueMedicine.Enabled = true;
         btnConsultBill.Enabled       = true;
     }
     else
     {
         if (_session.SavePermission == true && _session.EditPermission == false &&
             _session.DeletePermission == false)
         {
             Patient_buttonEnable(true);
             Consult_buttonEnable(true);
             IssueMedcine_buttonEnable(true);
             Pathology_buttonEnable(true);
         }
         if (_session.SavePermission == true && _session.EditPermission == true &&
             _session.DeletePermission == false)
         {
             Patient_buttonEnable(true);
             Consult_buttonEnable(true);
             IssueMedcine_buttonEnable(true);
             Pathology_buttonEnable(true);
             btnConsultEdit.Enabled                        = true;
             btnPathologyEdit.Enabled                      = true;
             btnMedicineEdit.Enabled                       = true;
             btnPatientEdit.Enabled                        = true;
             gridView1.Columns["Remove"].Visible           = false;
             gridView.Columns["Remove"].Visible            = false;
             griViewIssueMedine.Columns["Remove"].Visible  = false;
             gridViewServiceBill.Columns["Remove"].Visible = false;
         }
         if (_session.SavePermission == true && _session.EditPermission == false &&
             _session.DeletePermission == true)
         {
             Patient_buttonEnable(true);
             Consult_buttonEnable(true);
             IssueMedcine_buttonEnable(true);
             Pathology_buttonEnable(true);
             btnConsultEdit.Enabled                        = false;
             btnPathologyEdit.Enabled                      = false;
             btnMedicineEdit.Enabled                       = false;
             btnPatientEdit.Enabled                        = false;
             gridView1.Columns["Remove"].Visible           = true;
             gridView.Columns["Remove"].Visible            = true;
             griViewIssueMedine.Columns["Remove"].Visible  = true;
             gridViewServiceBill.Columns["Remove"].Visible = true;
         }
     }
 }
 private void Operation_Load(object sender, EventArgs e)
 {
     GetOTRef();
     GetOpInfo();
     GetOperationSchedule();
     CosulultDoctor();
     GetFirstAsst();
     _session.ChkPermission(MainWindow.userName);
     if (_session.SavePermission == false)
     {
         Operation_buttonEnable(true);
         btnSave.Enabled = false;
     }
     else
     {
         Operation_buttonEnable(true);
     }
 }
Exemple #4
0
        public OutdoorPatientUi()
        {
            InitializeComponent();

            UserMaster aUserMaster;

            _session.ChkPermission(MainWindow.userName);


            aOutdoorPatientManager = new OutdoorPatientManager();
            ActiveControl          = cmbTreatmentType;

            //Control buttonControl = new ButtonPermissionAccess().UserButton(this.panel4, this.Name);
        }
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                xtraTabPage1.Show();
                flag = true;
                GetAllCabinUpdate();
                txtOpid.Text        = gridView1.GetFocusedRowCellValue("OPID").ToString();
                AdmissionDate.Text  = gridView1.GetFocusedRowCellValue("InputDate").ToString();
                AdmissionTime.Text  = gridView1.GetFocusedRowCellValue("AdmissionTime").ToString();
                txtName.Text        = gridView1.GetFocusedRowCellValue("PatientName").ToString();
                txtFatherName.Text  = gridView1.GetFocusedRowCellValue("FatherName").ToString();
                txtMother.Text      = gridView1.GetFocusedRowCellValue("MotherName").ToString();
                txtAddress.Text     = gridView1.GetFocusedRowCellValue("Address").ToString();
                txtAge.Text         = gridView1.GetFocusedRowCellValue("Age").ToString();
                txtPhone.Text       = gridView1.GetFocusedRowCellValue("Phone").ToString();
                txtGurdian.Text     = gridView1.GetFocusedRowCellValue("Gurdian").ToString();
                txtRelation.Text    = gridView1.GetFocusedRowCellValue("Relation").ToString();
                txtNationality.Text = gridView1.GetFocusedRowCellValue("Nationality").ToString();
                cmbRefferBy.Text    = gridView1.GetFocusedRowCellValue("RefferedBy").ToString();
                //comPrimaryDoctor.Text = gridView1.GetFocusedRowCellValue("Doctor").ToString();
                txtPatientCondition.Text    = gridView1.GetFocusedRowCellValue("paitentConditon").ToString();
                cmbDepartment.Text          = gridView1.GetFocusedRowCellValue("Department").ToString();
                cmbDutydoctor.SelectedValue = gridView1.GetFocusedRowCellValue("DutyDoctorId").ToString();
                cmbGender.Text        = gridView1.GetFocusedRowCellValue("Gender").ToString();
                cmbbloodGroup.Text    = gridView1.GetFocusedRowCellValue("BloodGroup").ToString();
                txtWeight.Text        = gridView1.GetFocusedRowCellValue("Weight").ToString();
                cmbReligion.Text      = gridView1.GetFocusedRowCellValue("Religion").ToString();
                cmbwardCabin.Text     = gridView1.GetFocusedRowCellValue("WardOrCabin").ToString();
                txtseletedBed.Text    = gridView1.GetFocusedRowCellValue("SelectedBed").ToString();
                txtReg.Text           = gridView1.GetFocusedRowCellValue("RegNo").ToString();
                cmbMaritalStatus.Text = gridView1.GetFocusedRowCellValue("MaritalStatus").ToString();
                cmbwardCabin.Text     = gridView1.GetFocusedRowCellValue("BedName").ToString();
                cmbArea.Text          = gridView1.GetFocusedRowCellValue("Area").ToString();

                pidSearchLookUpEdit.Enabled = false;



                _session.ChkPermission(MainWindow.userName);
                if (_session.EditPermission == true && _session.DeletePermission == true)
                {
                    buttonEnable(false);
                }
                if (_session.EditPermission == true && _session.DeletePermission == false)
                {
                    buttonEnable(false);
                    btnDelete.Enabled = _session.DeletePermission;
                }
                if (_session.EditPermission == false && _session.DeletePermission == true)
                {
                    buttonEnable(false);
                    btnEdit.Enabled = _session.EditPermission;
                }
                if (_session.EditPermission == false && _session.DeletePermission == false)
                {
                    buttonEnable(true);
                    btnSave.Enabled = false;
                }



                //for test only

                btnEdit.Enabled = true;

                //for test only
            }
            catch (Exception ex)
            {
                new MailServer.MailServerConnection().SentMail(ex.GetBaseException().ToString());
            }
        }