/// <summary> /// 1 and only constructor /// </summary> /// <param name="BaseMaster"></param> public CBaseData(CBaseMaster BaseMaster) { BaseMster = BaseMaster; DBConn = BaseMster.DBConn; SessionID = BaseMster.SessionID; ClientIP = BaseMster.ClientIP; UserID = BaseMster.UserID; }
/// <summary> /// constructor /// </summary> public CAppUserControl() { m_BaseMstr = null; m_MPE = null; m_divStatus = new HtmlGenericControl(); m_divTitle = new HtmlGenericControl(); m_divStatus.InnerHtml = string.Empty; m_divTitle.InnerHtml = string.Empty; m_plistOptions = new CParameterList(); }
/// <summary> /// US:864 US:876 loads a dropdown list with patient checklists, will screen out /// check lists that the user does not have view permissions for. /// </summary> /// <param name="BaseMastr"></param> /// <param name="strPatientID"></param> /// <param name="ddl"></param> /// <returns></returns> public CStatus LoadPatientChecklists(CBaseMaster BaseMstr, string strPatientID, DropDownList ddl) { CPatientChecklistLogic pcl = new CPatientChecklistLogic(BaseMstr.BaseData); CStatus status = pcl.RunLogic(strPatientID); if (!status.Status) { return(status); } CPatChecklistData pc = new CPatChecklistData(BaseMstr.BaseData); DataSet ds = null; status = pc.GetPatChecklistDS(strPatientID, out ds); if (!status.Status) { return(status); } //remove records from the ds that the user is not allowed to view foreach (DataTable table in ds.Tables) { foreach (DataRow dr in table.Rows) { long lChecklistID = CDataUtils.GetDSLongValue(dr, "CHECKLIST_ID"); CChecklistPermissionsDataItem pdi = null; CChecklistData clData = new CChecklistData(BaseMstr.BaseData); clData.GetCheckListPermissionsDI(lChecklistID, out pdi); //is the user allowed to view this checklist if (!pdi.HasPermission(BaseMstr.AppUser, k_CHECKLIST_PERMISSION.Viewable)) { dr.Delete(); } } } ds.AcceptChanges(); //render the dataset status = CDropDownList.RenderDataSet( ds, ddl, "CHECKLIST_LABEL", "PAT_CL_ID"); if (!status.Status) { return(status); } return(new CStatus()); }
/// <summary> /// US:837 loads the apps top main menu /// </summary> /// <param name="mnuMain"></param> /// <param name="lStatusCode"></param> /// <param name="strStatus"></param> /// <returns></returns> public CStatus LoadMainMenu(CBaseMaster BaseMstr, Menu mnuMain) { CStatus status = new CStatus(); if (mnuMain == null) { status.Status = false; status.StatusCode = k_STATUS_CODE.Failed; status.StatusComment = Resources.ErrorMessages.ERROR_LOAD_MENU; return(status); } DataSet dsMenu = null; CMenuData mnuData = new CMenuData(BaseMstr); status = mnuData.GetUserMenuOptionDS(out dsMenu); if (!status.Status) { return(status); } //use our UI class to render the menu CMenu menu = new CMenu(); status = menu.RenderDataSet( dsMenu, mnuMain, "menu_option_label", "menu_option_url", "menu_option_label", BaseMstr.GetPageName()); if (!status.Status) { return(status); } return(status); }
//Constructor public CMenuData(CBaseMaster BaseMaster) : base(BaseMaster) { //constructors are not inherited in c#! }