/// <summary>
        /// GetColumnsByDefault
        /// </summary>
        /// <param name="fmType">fmType</param>
        /// <param name="companyId">companyId</param>
        /// <param name="inColumnsByDefault">inColumnsByDefault</param>
        /// <returns>columns by default</returns>
        public string GetColumnsByDefault(string fmType, int companyId, bool inColumnsByDefault)
        {
            FmTypeViewDisplayGateway fmTypeViewDisplayGateway = new FmTypeViewDisplayGateway(Data);
            fmTypeViewDisplayGateway.LoadByFmTypeInColumnsByDefault(fmType, companyId, inColumnsByDefault);

            string columnsByDefault = "";

            foreach (FmViewTDS.LFS_FM_TYPE_VIEW_DISPLAYRow row in (FmViewTDS.LFS_FM_TYPE_VIEW_DISPLAYDataTable)Table)
            {
                if ((row.FmType == fmType) && (row.COMPANY_ID == companyId) && (row.Always))
                {
                    columnsByDefault = columnsByDefault + row.Name + ", ";
                }
            }

            columnsByDefault = columnsByDefault.Substring(0, columnsByDefault.Length - 2);

            return columnsByDefault;
        }
        /// <summary>
        /// GetColumnsToDisplay
        /// </summary>
        /// <returns>columns to display</returns>
        public string GetColumnsToDisplay()
        {
            string columnsToDisplay = "";

            foreach (FmViewTDS.FmViewDisplayTempRow row in (FmViewTDS.FmViewDisplayTempDataTable)Table)
            {
                if (row.Selected)
                {
                    FmTypeViewDisplay fmTypeViewDisplay = new FmTypeViewDisplay();
                    fmTypeViewDisplay.LoadByFmTypeDisplayId(row.FmType, row.COMPANY_ID, row.DisplayID);

                    FmTypeViewDisplayGateway fmTypeViewDisplayGateway = new FmTypeViewDisplayGateway(fmTypeViewDisplay.Data);
                    columnsToDisplay = columnsToDisplay + fmTypeViewDisplayGateway.GetName(row.FmType, row.COMPANY_ID, row.DisplayID) + ", ";
                }
            }

            if (columnsToDisplay.Length > 2)
            {
                columnsToDisplay = columnsToDisplay.Substring(0, columnsToDisplay.Length - 2);
            }

            return columnsToDisplay;
        }
 /// <summary>
 /// LoadByFmTypeDisplayId
 /// </summary>
 /// <param name="fmType">fmType</param>
 /// <param name="companyId">companyId</param>
 /// <param name="displayId">displayId</param>
 public void LoadByFmTypeDisplayId(string fmType, int companyId, int displayId)
 {
     FmTypeViewDisplayGateway columnsToDisplayGateway = new FmTypeViewDisplayGateway(Data);
     columnsToDisplayGateway.LoadByFmTypeDisplayId(fmType, companyId, displayId);
 }
Пример #4
0
        /// <summary>
        /// GetColumnsToDisplayForViews
        /// </summary>
        /// <param name="viewId">viewId</param>
        /// <param name="fmType">fmType</param>
        /// <param name="companyId">companyId</param>
        /// <returns>columnsToDisplay</returns>
        public string GetColumnsToDisplayForViews(int viewId, string fmType, int companyId)
        {
            FmViewDisplayGateway fmViewDisplayGateway = new FmViewDisplayGateway(Data);
            fmViewDisplayGateway.LoadByViewIdFmType(viewId, fmType, companyId);

            string columnsToDisplay = "";

            foreach (FmViewTDS.LFS_FM_VIEW_DISPLAYRow row in (FmViewTDS.LFS_FM_VIEW_DISPLAYDataTable)Table)
            {
                if ((row.FmType == fmType) && (row.COMPANY_ID == companyId) && (row.ViewID == viewId))
                {
                    FmTypeViewDisplayGateway fmTypeViewDisplayGateway = new FmTypeViewDisplayGateway();
                    fmTypeViewDisplayGateway.LoadByFmTypeDisplayId(fmType, companyId, row.DisplayID);

                    columnsToDisplay = columnsToDisplay + fmTypeViewDisplayGateway.GetName(fmType, companyId, row.DisplayID) + ", ";
                }
            }

            columnsToDisplay = columnsToDisplay.Substring(0, columnsToDisplay.Length - 2);

            return columnsToDisplay;
        }