/// <summary> /// Determines whether [has function right] [the specified feature identifier]. /// </summary> /// <param name="featureId">The feature identifier.</param> /// <param name="functionId">The function identifier.</param> /// <returns></returns> public bool HasFunctionRight(int featureId, int functionId) { return(GblIQCare.HasFunctionRight(featureId, functionId, this.UserRights)); //DataView theDV = new DataView(this.UserRights); //theDV.RowFilter = "FeatureId = " + featureId.ToString() + " and FunctionId = " + functionId.ToString(); //if (theDV.Count > 0) //{ // return true; //} //else //{ // return false; //} }
public void SetRights() { //form level permission set if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnAdd.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { btnEdit.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.Delete, GblIQCare.dtUserRight) == false) { btnDelete.Enabled = false; } }
private void Init_Form() { Bind_Combo(); rdoImport.Checked = false; rdoExport.Checked = false; grpExport.Enabled = false; grpImport.Enabled = false; txtFileName.Text = ""; cmbExpLocation.SelectedValue = "0"; cmbImpLocation.SelectedValue = "0"; if (GblIQCare.HasFunctionRight(ApplicationAccess.FBDataBaseSyncronisation, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.FBDataBaseSyncronisation, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { rdoImport.Enabled = false; rdoExport.Enabled = false; } }
public void SetRights() { //form level permission set if (GblIQCare.ItemFeatureId == 144) { if (GblIQCare.HasFunctionRight(ApplicationAccess.SupplierItem, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } else if (GblIQCare.ItemFeatureId == 149) { if (GblIQCare.HasFunctionRight(ApplicationAccess.StoreItem, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } }
private void frmDatabaseBackup_Load(object sender, EventArgs e) { this.Top = 1; this.Left = 1; //set css begin clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); //set css end if (GblIQCare.HasFunctionRight(ApplicationAccess.Backupsetup, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.Backupsetup, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { btnBackup.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.Backuprestore, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.Backuprestore, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { btnRestoreDatabase.Enabled = false; } }
private void frmDataUpsizing_Load(object sender, EventArgs e) { this.Top = 1; this.Left = 1; //set css begin clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); //set css end if (GblIQCare.HasFunctionRight(ApplicationAccess.Upsize, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnUpsize.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.Upsize, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { btnUpsize.Enabled = false; } }
private void frmModule_Load(object sender, EventArgs e) { clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); BindGrid(); if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageTechnicalArea, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnCreate.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageTechnicalArea, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { dgwModuleDetails.Enabled = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageTechnicalArea, FunctionAccess.Delete, GblIQCare.dtUserRight) == false) { btnCreate.Enabled = false; } }
private void dgwFormDetails_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientRegistration, FunctionAccess.Update, GblIQCare.dtUserRight) == true) { EnableControl(); if (e.RowIndex != -1) { strFormName = ""; strFormNameDb = dgwFormDetails.Rows[e.RowIndex].Cells[0].Value.ToString(); strFormName = strFormNameDb.Replace(" ", "_"); for (int i = 0; i < objDsFormDetails.Tables[0].Rows.Count; i++) { if (strFormNameDb == objDsFormDetails.Tables[0].Rows[i]["FormName"].ToString()) { GblIQCare.iFormBuilderId = Convert.ToInt32(objDsFormDetails.Tables[0].Rows[i]["FormId"]); strPublished = objDsFormDetails.Tables[0].Rows[i][3].ToString(); break; } } if (strPublished == "2") { DisableControl(); } else { EnableControl(); } if (e.ColumnIndex == -1) { iColIndex = 0; } else { iColIndex = e.ColumnIndex; } if (dgwFormDetails.Columns[iColIndex].HeaderText == "Published") { if (strPublished == "0" || strPublished == "1") { IManageForms objFormDetail; objFormDetail = (IManageForms)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BManageForms,BusinessProcess.FormBuilder"); DialogResult strResult; strResult = MessageBox.Show("Do you want to Published this form", "Yes/No", MessageBoxButtons.YesNo); if (strResult.ToString() == "Yes") { string strValue; strValue = "2"; int rowstate = objFormDetail.ResetFormStatus(GblIQCare.iFormBuilderId, strValue, GblIQCare.AppUserId); dgwFormDetails.DataSource = null; BindGrid(); } } else { IManageForms objFormDetail; objFormDetail = (IManageForms)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BManageForms,BusinessProcess.FormBuilder"); DialogResult strResult; strResult = MessageBox.Show("Do you want to unpublish this form?", "Yes/No", MessageBoxButtons.YesNo); if (strResult.ToString() == "Yes") { string strValue; strValue = "1"; int rowstate = objFormDetail.ResetFormStatus(GblIQCare.iFormBuilderId, strValue, GblIQCare.AppUserId); dgwFormDetails.DataSource = null; BindGrid(); EnableControl(); } } } } } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this); } }
private void frmMain_Load(object sender, EventArgs e) { clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); this.Text = PMTCTConstants.strIQCareTitle + " [" + GblIQCare.AppUserName + "] - " + GblIQCare.AppLocation; lblStatus.Text = GblIQCare.AppVersion + " Release Date: " + GblIQCare.ReleaseDate; lblCopyRight.Text = "©" + System.DateTime.Now.Year.ToString() + " Futures Group International"; #region "Module Validation" DataTable theModTable = GblIQCare.dtModules; DataView theDV = new DataView(theModTable); theDV.RowFilter = "ModuleId = 201"; if (theDV.Count < 1) { mnuPMSCM.Visible = false; } #endregion #region "User Authentication" if (GblIQCare.HasFeatureRight(ApplicationAccess.FormBuilder, GblIQCare.dtUserRight) == false) { mnuFormBuilder.Visible = false; mnuDBMerge.Visible = false; mnuDBMerge.Visible = false; mnuDBMigration.Visible = false; mnuUpsize.Visible = false; toolStripSeparator1.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageFields, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageFields.Visible = false; mnuManageCareEndedFields.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureHomePages, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuConfigureHomePageForms.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureCareTermination, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuConfigCareTermination.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageForms.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DatabaseMigration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDBMigration.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.Upsize, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuUpsize.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DatabaseMerge, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDBMerge.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.SpecialFormLinking, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuSplFormLinking.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageTechnicalArea, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageModule.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientVisitConfiguration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuVisitConfiguration.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DrugDispense, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuPatientDrugDispense.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PurchaseOrder, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuPurchaseOrder.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.GoodReceiveNotes, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuGoodReceivedNote.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.OpeningStock, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuOpeningStock.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.AdjustStocklevel, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuAdjustStock.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DisposeItem, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDisposeItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.BatchSummary, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuBatchSummary.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.StockSummary, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuStockSummary.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ExpiryReport, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuExpiryReport.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.BudgetConfiguration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuConfigureBudget.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientVisitConfiguration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuVisitConfiguration.Visible = false; } #endregion }
public void SetRights() { //form level permission set //"Cost Allocation Category"\\deepika if (GblIQCare.ItemFeatureId == 134) { if (GblIQCare.HasFunctionRight(ApplicationAccess.CostAllocationCategory, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } // "Item Type" else if (GblIQCare.ItemFeatureId == 135) { if (GblIQCare.HasFunctionRight(ApplicationAccess.ItemType, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } // "Lab Test Location" else if (GblIQCare.ItemFeatureId == 135) { if (GblIQCare.HasFunctionRight(ApplicationAccess.LabTestLocation, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } //"Manufacturer Detail" else if (GblIQCare.ItemFeatureId == 137) { if (GblIQCare.HasFunctionRight(ApplicationAccess.ManufacturerDetail, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } // "Purchasing/Dispensing Unit" else if (GblIQCare.ItemFeatureId == 138) { if (GblIQCare.HasFunctionRight(ApplicationAccess.PurchasingDispensingUnit, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } // "Return Reason" else if (GblIQCare.ItemFeatureId == 139) { if (GblIQCare.HasFunctionRight(ApplicationAccess.ReturnReason, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } //"Adjustment Reason" else if (GblIQCare.ItemFeatureId == 140) { if (GblIQCare.HasFunctionRight(ApplicationAccess.AdjustmentReason, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } //"Drug Type" else if (GblIQCare.ItemFeatureId == 142) { if (GblIQCare.HasFunctionRight(ApplicationAccess.DrugType, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } // "Batch Number" else if (GblIQCare.ItemFeatureId == 150) { if (GblIQCare.HasFunctionRight(ApplicationAccess.DrugType, FunctionAccess.Add, GblIQCare.dtUserRight) == false) { btnSave.Enabled = false; } } }
private void frmMain_Load(object sender, EventArgs e) { clsCssStyle theStyle = new clsCssStyle(); theStyle.setStyle(this); this.Text = PMTCTConstants.strIQCareTitle + " [" + GblIQCare.AppUserName + "] - " + GblIQCare.AppLocation; lblStatus.Text = GblIQCare.AppVersion + " Release Date: " + GblIQCare.ReleaseDate; lblCopyRight.Text = "©" + System.DateTime.Now.Year.ToString() + " Palladium Inc."; #region "Module Validation" DataTable theModTable = GblIQCare.dtModules; //DataView theDV = new DataView(theModTable); //theDV.RowFilter = "ModuleId = 201"; //if (theDV.Count < 1) if (GblIQCare.dtFacility.Rows[0]["PMSCM"].ToString() != "1") { mnuPMSCM.Visible = false; } if (GblIQCare.dtFacility.Rows[0]["Billing"].ToString() != "1") { mnuBilling.Visible = false; } #endregion #region "User Authentication" if (GblIQCare.HasFeatureRight(ApplicationAccess.FormBuilder, GblIQCare.dtUserRight) == false) { mnuFormBuilder.Visible = false; //mnuDBMerge.Visible = false; //mnuDBMigration.Visible = false; //mnuUpsize.Visible = false; //toolStripSeparator1.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageFields, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageFields.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBManageCareEndedField, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageCareEndedFields.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBManageRegField, FunctionAccess.View, GblIQCare.dtUserRight) == false) { manageRegistrationFieldsToolStripMenuItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureHomePages, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuConfigureHomePageForms.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ConfigureCareTermination, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuConfigCareTermination.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageForms, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageForms.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DatabaseMigration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDBMigration.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.Upsize, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuUpsize.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DatabaseMerge, FunctionAccess.View, GblIQCare.dtUserRight) == false) { // mnuDBMerge.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.SpecialFormLinking, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuSplFormLinking.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ManageTechnicalArea, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuManageModule.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DrugDispense, FunctionAccess.View, GblIQCare.dtUserRight) == false) { //mnuPatientDrugDispense.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PurchaseOrder, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.PurchaseOrder, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuPurchaseOrder.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.GoodReceiveNotes, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.GoodReceiveNotes, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuGoodReceivedNote.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.OpeningStock, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.AdjustStocklevel, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuOpeningStock.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.AdjustStocklevel, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.AdjustStocklevel, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuAdjustStock.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.DisposeItem, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.DisposeItem, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuDisposeItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.BatchSummary, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuBatchSummary.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.StockSummary, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuStockSummary.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.ExpiryReport, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuExpiryReport.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.BudgetConfiguration, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.BudgetConfiguration, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuConfigureBudget.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientVisitConfiguration, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.PatientVisitConfiguration, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuVisitConfiguration.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBDBOperation, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDBOperations.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.QueryBuilderReports, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuQueryBuilder.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBDataBaseSyncronisation, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuDBMerge.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBSCMConfiguration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { sCMToolStripMenuItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.Backuprestore, FunctionAccess.View, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.Backupsetup, FunctionAccess.View, GblIQCare.dtUserRight) == false) { backupDatabaseToolStripMenuItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBFieldAssociation, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuViewFieldAsscociation.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.FBImportExportForm, FunctionAccess.View, GblIQCare.dtUserRight) == false) { mnuImportExportForms.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.PatientRegistration, FunctionAccess.View, GblIQCare.dtUserRight) == false) { configureToolStripMenuItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.RequistionVoucher, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.RequistionVoucher, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { counterRequisitionToolStripMenuItem.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.BudgetView, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.BudgetView, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { mnuBudgetView.Visible = false; } if (GblIQCare.HasFunctionRight(ApplicationAccess.IssueVoucher, FunctionAccess.Add, GblIQCare.dtUserRight) == false && GblIQCare.HasFunctionRight(ApplicationAccess.IssueVoucher, FunctionAccess.Update, GblIQCare.dtUserRight) == false) { issueVoucherToolStripMenuItem.Visible = false; } #endregion }