Beispiel #1
0
        public override int?Save(string action)
        {
            var data = new FunctionalityDataModel();

            data.FunctionalityId             = SystemKeyId;
            data.Name                        = Name;
            data.Description                 = Description;
            data.SortOrder                   = SortOrder;
            data.FunctionalityActiveStatusId = FunctionalityActiveStatusId;
            data.FunctionalityPriorityId     = FunctionalityPriorityId;

            if (action == "Insert")
            {
                var dtFunctionality = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.DoesExist(data, SessionVariables.RequestProfile);

                if (dtFunctionality.Rows.Count == 0)
                {
                    TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Create(data, SessionVariables.RequestProfile);
                }
                else
                {
                    throw new Exception("Record with given ID already exists.");
                }
            }
            else
            {
                TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Update(data, SessionVariables.RequestProfile);
            }

            return(data.FunctionalityId);
        }
Beispiel #2
0
        protected override void ShowData(int functionalityId)
        {
            oDetailButtonPanel.SetId = SetId;
            var data = new FunctionalityDataModel();

            data.FunctionalityId = functionalityId;

            var items = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            if (items.Count == 1)
            {
                var item = items[0];

                lblFunctionalityId.Text             = item.FunctionalityId.ToString();
                lblApplicationId.Text               = SessionVariables.RequestProfile.ApplicationId.ToString();
                lblName.Text                        = item.Name;
                lblDescription.Text                 = item.Description;
                lblSortOrder.Text                   = item.SortOrder.ToString();
                lblFunctionalityActiveStatusId.Text = item.FunctionalityActiveStatus.ToString();
                lblFunctionalityPriorityId.Text     = item.FunctionalityPriority.ToString();

                oUpdateInfo.LoadText(item.UpdatedDate, item.UpdatedBy, item.LastAction);

                oHistoryList.Setup(PrimaryEntity, functionalityId, "Functionality");
            }
            else
            {
                Clear();
            }
        }
Beispiel #3
0
        public static List <FunctionalityDataModel> GetEntityDetails(FunctionalityDataModel dataQuery, RequestProfile requestedProfile, int returnAuditInfo = BaseDataManager.ReturnAuditInfoOnDetails)
        {
            const string sql = @"dbo.FunctionalitySearch ";

            var parameters =
                new
            {
                AuditId                       = requestedProfile.AuditId
                , ApplicationId               = dataQuery.ApplicationId
                , FunctionalityId             = dataQuery.FunctionalityId
                , Name                        = dataQuery.Name
                , FunctionalityPriorityId     = dataQuery.FunctionalityPriorityId
                , FunctionalityActiveStatusId = dataQuery.FunctionalityActiveStatus
                , NumberOfImages              = dataQuery.NumberOfImages
                , ReturnAuditInfo             = returnAuditInfo
            };

            List <FunctionalityDataModel> result;

            using (var dataAccess = new DataAccessBase(DataStoreKey))
            {
                result = dataAccess.Connection.Query <FunctionalityDataModel>(sql, parameters, commandType: CommandType.StoredProcedure).ToList();
            }

            return(result);
        }
Beispiel #4
0
        private static string CreateOrUpdate(FunctionalityDataModel data, RequestProfile requestedProfile, string action)
        {
            var sql = "EXEC ";

            switch (action)
            {
            case "Create":
                sql += "dbo.FunctionalityInsert  " + "\r\n" +
                       " " + ToSQLParameter(BaseDataModel.BaseDataColumns.AuditId, requestedProfile.AuditId) +
                       ", " + ToSQLParameter(BaseDataModel.BaseDataColumns.ApplicationId, requestedProfile.ApplicationId);
                break;

            case "Update":
                sql += "dbo.FunctionalityUpdate  " + "\r\n" +
                       " " + ToSQLParameter(BaseDataModel.BaseDataColumns.AuditId, requestedProfile.AuditId) +
                       ", " + ToSQLParameter(BaseDataModel.BaseDataColumns.ApplicationId, requestedProfile.ApplicationId);
                break;

            default:
                break;
            }

            sql = sql + ", " + ToSQLParameter(data, FunctionalityDataModel.DataColumns.FunctionalityId) +
                  ", " + ToSQLParameter(data, FunctionalityDataModel.StandardDataColumns.Name) +
                  ", " + ToSQLParameter(data, FunctionalityDataModel.StandardDataColumns.Description) +
                  ", " + ToSQLParameter(data, StandardDataModel.StandardDataColumns.SortOrder) +
                  ", " + ToSQLParameter(data, FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId) +
                  ", " + ToSQLParameter(data, FunctionalityDataModel.DataColumns.FunctionalityPriorityId);

            return(sql);
        }
Beispiel #5
0
        public static List <FunctionalityDataModel> GetFunctionalityList(RequestProfile requestedProfile)
        {
            var sql = "EXEC dbo.FunctionalitySearch " +
                      " " + ToSQLParameter(BaseDataModel.BaseDataColumns.AuditId, requestedProfile.AuditId);          // +
            //", " + ToSQLParameter(BaseDataModel.BaseDataColumns.ApplicationId, requestedProfile.ApplicationId);

            var result = new List <FunctionalityDataModel>();

            using (var reader = new DBDataReader("Get List", sql, DataStoreKey))
            {
                var dbReader = reader.DBReader;

                while (dbReader.Read())
                {
                    var dataItem = new FunctionalityDataModel();

                    dataItem.ApplicationId               = (int)dbReader[FunctionalityDataModel.DataColumns.ApplicationId];
                    dataItem.FunctionalityId             = (int)dbReader[FunctionalityDataModel.DataColumns.FunctionalityId];
                    dataItem.FunctionalityPriorityId     = (int)dbReader[FunctionalityDataModel.DataColumns.FunctionalityPriorityId];
                    dataItem.FunctionalityActiveStatusId = (int)dbReader[FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId];
                    dataItem.Description = dbReader[StandardDataModel.StandardDataColumns.Description].ToString();
                    dataItem.SortOrder   = (int)dbReader[StandardDataModel.StandardDataColumns.SortOrder];
                    dataItem.Name        = dbReader[StandardDataModel.StandardDataColumns.Name].ToString();

                    result.Add(dataItem);
                }
            }

            return(result);
        }
Beispiel #6
0
        public void SetData(FunctionalityDataModel data)
        {
            SystemKeyId             = data.FunctionalityId;
            FunctionalityPriorityId = data.FunctionalityPriorityId;

            base.SetData(data);
        }
Beispiel #7
0
        protected override void Clear()
        {
            base.Clear();

            var data = new FunctionalityDataModel();

            SetData(data);
        }
Beispiel #8
0
        public static DataTable Search(FunctionalityDataModel data, RequestProfile requestedProfile)
        {
            var list = GetEntityDetails(data, requestedProfile, 0);

            var table = list.ToDataTable();

            return(table);
        }
Beispiel #9
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var functionalitydata = new FunctionalityDataModel();

            functionalitydata.FunctionalityId = entityKey;
            var results = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(functionalitydata, SessionVariables.RequestProfile);

            return(results);
        }
Beispiel #10
0
        private System.Data.DataTable GetData()
        {
            // TODO: on all export pages
            var data = new FunctionalityDataModel();

            var dt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Beispiel #11
0
        private DataTable GetData(string name)
        {
            var data = new FunctionalityDataModel();

            data.Name = name;

            var dt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Beispiel #12
0
        public static bool DoesExist(FunctionalityDataModel data, RequestProfile requestProfile)
        {
            var doesExistRequest = new FunctionalityDataModel();

            doesExistRequest.Name = data.Name;

            var list = GetEntityDetails(doesExistRequest, requestProfile, 0);

            return(list.Count > 0);
        }
Beispiel #13
0
        public static DataSet DeleteChildren(FunctionalityDataModel data, RequestProfile requestProfile)
        {
            var sql = "EXEC dbo.FunctionalityChildrenDelete " +
                      " " + ToSQLParameter(BaseDataModel.BaseDataColumns.AuditId, requestProfile.AuditId) +
                      ", " + ToSQLParameter(data, FunctionalityDataModel.DataColumns.FunctionalityId);

            var oDT = new DBDataSet("Functionality.DeleteChildren", sql, DataStoreKey);

            return(oDT.DBDataset);
        }
Beispiel #14
0
        protected override void Update(Dictionary <string, string> values)
        {
            var data = new FunctionalityDataModel();

            // copies properties from values dictionary object to data object
            PropertyMapper.CopyProperties(data, values);

            TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Update(data, SessionVariables.RequestProfile);
            base.Update(values);
        }
Beispiel #15
0
        public void LoadData(int functionalityId, bool showId)
        {
            Clear();

            var data = new FunctionalityDataModel();

            data.FunctionalityId = functionalityId;


            var items = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            if (items.Count > 1)
            {
                var item1 = items[0];
                txtApplicationId.Text = item1.Application.ToString();
                txtName.Text          = item1.Name;
                txtSortOrder.Text     = item1.SortOrder.ToString();
                editor.Text           = item1.Description;
                txtFunctionalityActiveStatusId.Text = item1.FunctionalityActiveStatusId.ToString();;
                txtFunctionalityPriorityId.Text     = item1.FunctionalityPriorityId.ToString();
                //return;
            }


            var item = items[0];

            var applicationInfo = ApplicationCommon.ApplicationCache[SessionVariables.RequestProfile.ApplicationId];

            txtApplicationId.Text = applicationInfo.Description;

            txtApplicationId.Enabled = false;

            drpFunctionalityPriorityList.SelectedValue = item.FunctionalityPriorityId.ToString();
            txtFunctionalityPriorityId.Text            = item.FunctionalityPriorityId.ToString();

            drpFunctionalityActiveStatusList.SelectedValue = item.FunctionalityActiveStatusId.ToString();
            txtFunctionalityActiveStatusId.Text            = item.FunctionalityActiveStatusId.ToString();

            SetData(item);

            if (!showId)
            {
                SystemKeyId = item.FunctionalityId;
                oHistoryList.Setup(PrimaryEntity, functionalityId, PrimaryEntityKey);
            }
            else
            {
                CoreSystemKey.Text = String.Empty;
            }
        }
Beispiel #16
0
        public static bool IsDeletable(FunctionalityDataModel data, RequestProfile requestProfile)
        {
            var isDeletable = true;

            var ds = GetChildren(data, requestProfile);

            if (ds != null && ds.Tables.Count > 0)
            {
                if (ds.Tables.Cast <DataTable>().Any(dt => dt.Rows.Count > 0))
                {
                    isDeletable = false;
                }
            }

            return(isDeletable);
        }
Beispiel #17
0
        public static string ToSQLParameter(FunctionalityDataModel data, string dataColumnName)
        {
            var returnValue = "NULL";

            switch (dataColumnName)
            {
            case FunctionalityDataModel.DataColumns.FunctionalityId:
                if (data.FunctionalityId != null)
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NUMBER, FunctionalityDataModel.DataColumns.FunctionalityId, data.FunctionalityId);
                }
                else
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NULL, FunctionalityDataModel.DataColumns.FunctionalityId);
                }
                break;

            case FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId:
                if (data.FunctionalityActiveStatusId != null)
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NUMBER, FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId, data.FunctionalityActiveStatusId);
                }
                else
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NULL, FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId);
                }
                break;

            case FunctionalityDataModel.DataColumns.FunctionalityPriorityId:
                if (data.FunctionalityPriorityId != null)
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NUMBER, FunctionalityDataModel.DataColumns.FunctionalityPriorityId, data.FunctionalityPriorityId);
                }
                else
                {
                    returnValue = string.Format(SQL_TEMPLATE_PARAMETER_NULL, FunctionalityDataModel.DataColumns.FunctionalityPriorityId);
                }
                break;

            default:
                returnValue = StandardDataManager.ToSQLParameter(data, dataColumnName);
                break;
            }

            return(returnValue);
        }
Beispiel #18
0
        public static void Delete(FunctionalityDataModel dataQuery, RequestProfile requestProfile)
        {
            const string sql = @"dbo.FunctionalityDelete ";

            var parameters =
                new
            {
                AuditId = requestProfile.AuditId
                ,
                FunctionalityId = dataQuery.FunctionalityId
            };

            using (var dataAccess = new DataAccessBase(DataStoreKey))
            {
                dataAccess.Connection.Execute(sql, parameters, commandType: CommandType.StoredProcedure);
            }
        }
Beispiel #19
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         var      notDeletableIds = new List <int>();
         string[] deleteIndexList = DeleteIds.Split(',');
         foreach (string index in deleteIndexList)
         {
             var data = new FunctionalityDataModel();
             data.FunctionalityId = int.Parse(index);
             if (!TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.IsDeletable(data, SessionVariables.RequestProfile))
             {
                 notDeletableIds.Add(Convert.ToInt32(data.FunctionalityId));
             }
         }
         if (notDeletableIds.Count == 0)
         {
             foreach (string index in deleteIndexList)
             {
                 var data = new FunctionalityDataModel();
                 data.FunctionalityId = int.Parse(index);
                 TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Delete(data, SessionVariables.RequestProfile);
             }
             Framework.Components.Audit.AuditHistoryDataManager.DeleteDataBySystemEntity(DeleteIds, (int)Framework.Components.DataAccess.SystemEntity.Functionality, SessionVariables.RequestProfile);
             Response.Redirect(Page.GetRouteUrl("FunctionalityEntityRoute", new { Action = "Default", SetId = true }), false);
         }
         else
         {
             var msg = String.Empty;
             foreach (var id in notDeletableIds)
             {
                 if (!string.IsNullOrEmpty(msg))
                 {
                     msg += ", <br/>";
                 }
                 msg += "FunctionalityId: " + id + " has detail records";
             }
             Response.Write(msg);
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }
Beispiel #20
0
        protected DataTable GetAssociatedFunctionalityIds(int functionalityEntityStatusId)
        {
            var data = new FunctionalityEntityStatusDataModel();

            data.FunctionalityEntityStatusId = functionalityEntityStatusId;
            var results = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityEntityStatusDataManager.Search(data, SessionVariables.RequestProfile);
            var fdt     = new DataTable();

            foreach (DataRow dr in results.Rows)
            {
                var funcId = dr[FunctionalityEntityStatusDataModel.DataColumns.FunctionalityId].ToString();
                var fdata  = new FunctionalityDataModel();
                fdata.FunctionalityId = int.Parse(funcId);
                fdt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(fdata, SessionVariables.RequestProfile);
            }
            //var dt = TaskTimeTracker.Components.Module.ApplicationDevelopment.Functionality.GetList(SessionVariables.RequestProfile);
            return(fdt);
        }
Beispiel #21
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();
            var data        = new FunctionalityDataModel();

            UpdatedData = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.FunctionalityId =
                    Convert.ToInt32(SelectedData.Rows[i][FunctionalityDataModel.DataColumns.FunctionalityId].ToString());

                data.FunctionalityActiveStatusId =
                    Convert.ToInt32(SelectedData.Rows[i][FunctionalityDataModel.DataColumns.FunctionalityActiveStatusId].ToString());

                data.FunctionalityPriorityId =
                    Convert.ToInt32(SelectedData.Rows[i][FunctionalityDataModel.DataColumns.FunctionalityPriorityId].ToString());

                data.Name =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Name))
                                         ? CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Name)
                                         : SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Name].ToString();

                data.Description = !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description))
                                        ? CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description)
                                        : SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Description].ToString();

                data.SortOrder =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder))
                                        ? int.Parse(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder).ToString())
                                        : int.Parse(SelectedData.Rows[i][StandardDataModel.StandardDataColumns.SortOrder].ToString());

                TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Update(data, SessionVariables.RequestProfile);
                data = new FunctionalityDataModel();
                data.FunctionalityId = Convert.ToInt32(SelectedData.Rows[i][FunctionalityDataModel.DataColumns.FunctionalityId].ToString());
                var dt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
Beispiel #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int imageId = Convert.ToInt32(Request.QueryString["imageid"]);

            var data = new FunctionalityDataModel();

            data.FunctionalityId = imageId;
            var dt = FunctionalityDataManager.GetDetails(data, SessionVariables.RequestProfile);

            if (dt.Rows.Count > 0)
            {
                if (!dt.Rows[0][FunctionalityImageDataModel.DataColumns.Image].Equals(DBNull.Value))
                {
                    var imageData = ((byte[])(dt.Rows[0][FunctionalityImageDataModel.DataColumns.Image]));

                    Response.Clear();
                    Response.ContentType = "image/pjpeg";
                    Response.BinaryWrite(imageData);
                    Response.End();
                }
            }
        }
Beispiel #23
0
        protected override DataTable GetData()
        {
            try
            {
                SuperKey = ApplicationCommon.GetSuperKey();
                SetId    = ApplicationCommon.GetSetId();

                var selectedrows      = new DataTable();
                var functionalitydata = new FunctionalityDataModel();

                selectedrows = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.GetDetails(functionalitydata, SessionVariables.RequestProfile).Clone();
                if (!string.IsNullOrEmpty(SuperKey))
                {
                    var systemEntityTypeId = (int)PrimaryEntity;
                    var lstEntityKeys      = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey);

                    foreach (var entityKey in lstEntityKeys)
                    {
                        functionalitydata.FunctionalityId = entityKey;
                        var result = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.GetDetails(functionalitydata, SessionVariables.RequestProfile);
                        selectedrows.ImportRow(result.Rows[0]);
                    }
                }
                else
                {
                    functionalitydata.FunctionalityId = SetId;
                    var result = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.GetDetails(functionalitydata, SessionVariables.RequestProfile);
                    selectedrows.ImportRow(result.Rows[0]);
                }
                return(selectedrows);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }

            return(null);
        }
Beispiel #24
0
        public static void Update(FunctionalityDataModel data, RequestProfile requestedProfile)
        {
            var sql = CreateOrUpdate(data, requestedProfile, "Update");

            DBDML.RunSQL("Functionality.Update", sql, DataStoreKey);
        }
Beispiel #25
0
        public static FunctionalityDataModel GetDetails(FunctionalityDataModel data, RequestProfile requestedProfile)
        {
            var list = GetEntityDetails(data, requestedProfile);

            return(list.FirstOrDefault());
        }
Beispiel #26
0
        private Table BuildReport(int[] entities, int[] functionalities)
        {
            var edata   = new SystemEntityTypeDataModel();
            var edt     = new DataTable();
            var fdata   = new FunctionalityDataModel();
            var fdt     = new DataTable();
            var fesdata = new FunctionalityEntityStatusDataModel();
            var fesdt   = new DataTable();
            var table   = new Table();

            table.CssClass    = "entityreport";
            table.GridLines   = GridLines.Both;
            table.BorderColor = System.Drawing.Color.Blue;
            table.BorderWidth = 2;
            table.BorderStyle = BorderStyle.Groove;
            var tablerow  = new TableRow();
            var tablecell = new TableCell();

            tablecell.Text = "Functionality/Entity";
            //tablecell.Style.Add("font-weight", "bold");
            //tablecell.Style.Add("width", "150px");
            tablerow.Cells.Add(tablecell);

            for (var i = 0; i < entities.Length; i++)
            {
                edata.SystemEntityTypeId = entities[i];
                edt       = Framework.Components.Core.SystemEntityTypeDataManager.Search(edata, SessionVariables.RequestProfile);
                tablecell = new TableCell();

                if (edt.Rows.Count >= 1)
                {
                    tablecell.Text = edt.Rows[0][SystemEntityTypeDataModel.DataColumns.EntityName].ToString();
                    //tablecell.Style.Add("font-weight", "bold");
                    //tablecell.Style.Add("width", "150px");
                    tablerow.Cells.Add(tablecell);
                }
            }

            table.Rows.Add(tablerow);
            tablerow = new TableRow();

            for (int j = 0; j < functionalities.Length; j++)
            {
                fdata.FunctionalityId = functionalities[j];
                fdt       = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(fdata, SessionVariables.RequestProfile);
                tablerow  = new TableRow();
                tablecell = new TableCell();

                if (fdt.Rows.Count >= 1)
                {
                    tablecell.Text = fdt.Rows[0][StandardDataModel.StandardDataColumns.Name].ToString();
                    //tablecell.Style.Add("font-weight", "bold");
                    //tablecell.Style.Add("width", "150px");
                    tablerow.Cells.Add(tablecell);
                }

                tablerow.Cells.Add(tablecell);

                for (int i = 1; i < table.Rows[0].Cells.Count; i++)
                {
                    tablerow.Cells.Add(new TableCell());
                }

                table.Rows.Add(tablerow);
            }

            var entity        = "";
            var functionality = "";

            for (var i = 0; i < functionalities.Length; i++)
            {
                for (var j = 0; j < entities.Length; j++)
                {
                    fesdata.SystemEntityTypeId = entities[j];
                    fesdata.FunctionalityId    = functionalities[i];
                    fesdt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityEntityStatusDataManager.Search(fesdata, SessionVariables.RequestProfile);
                    if (fesdt.Rows.Count == 1)
                    {
                        fdata.FunctionalityId = functionalities[i];
                        fdt = TaskTimeTracker.Components.Module.ApplicationDevelopment.FunctionalityDataManager.Search(fdata, SessionVariables.RequestProfile);

                        if (fdt.Rows.Count >= 1)
                        {
                            functionality = fdt.Rows[0][StandardDataModel.StandardDataColumns.Name].ToString();
                        }

                        edata.SystemEntityTypeId = entities[j];
                        edt = Framework.Components.Core.SystemEntityTypeDataManager.Search(edata, SessionVariables.RequestProfile);

                        if (edt.Rows.Count >= 1)
                        {
                            entity = edt.Rows[0][SystemEntityTypeDataModel.DataColumns.EntityName].ToString();
                        }

                        for (var k = 1; k < table.Rows.Count; k++)
                        {
                            for (int l = 1; l < table.Rows[0].Cells.Count; l++)
                            {
                                if (table.Rows[k].Cells[0].Text.Equals(functionality) &&
                                    table.Rows[0].Cells[l].Text.Equals(entity))
                                {
                                    table.Rows[k].Cells[l].Text = fesdt.Rows[0][FunctionalityEntityStatusDataModel.DataColumns.FunctionalityStatus].ToString();
                                    break;
                                }
                            }
                        }
                    }
                }
            }

            TableReportContent.Controls.Add(table);

            return(table);
        }