public IList <DesignedColumnProxy> GetAllConceptAndTrafficColumnsByPeriodicType(ScndCnpPeriodicType priodicType, decimal reportId)
        {
            try
            {
                IList <SecondaryConcept>   conceptList      = new GTS.Clock.Business.Concept.BConcept().GetAllConceptByPeriodicType(priodicType).Where(c => c.KeyColumnName != null && c.KeyColumnName.Trim() != string.Empty && c.ShowInReport).ToList();
                List <DesignedColumnProxy> conceptProxyList = new List <DesignedColumnProxy>();
                foreach (SecondaryConcept item in conceptList)
                {
                    DesignedColumnProxy conceptProxy = new DesignedColumnProxy(item);
                    conceptProxy.ColumnType = DesignedReportColumnType.Concept;
                    conceptProxy.KeyColumn  = item.KeyColumnName;
                    conceptProxyList.Add(conceptProxy);
                }
                Report             reportObj     = new BReport().GetByID(reportId);
                DesignedReportType reportTypeObj = GetAllDesignedReportsTypes().SingleOrDefault(d => d.CustomCode == DesignedReportTypeEnum.Daily);
                if (reportObj.DesignedType == reportTypeObj)
                {
                    IList <DesignedReportTrafficColumn> designedReportTrafficColumnList = new BDesignedReportsColumn().GetAllDesignedReportsTrafficColumns();
                    int i = 0;
                    foreach (DesignedReportTrafficColumn item in designedReportTrafficColumnList)
                    {
                        DesignedColumnProxy conceptProxy = new DesignedColumnProxy();
                        conceptProxy.FnName     = item.FnName;
                        conceptProxy.EnName     = item.EnName;
                        conceptProxy.Name       = item.Name;
                        conceptProxy.ID         = item.ID;
                        conceptProxy.ColumnType = DesignedReportColumnType.Traffic;

                        conceptProxy.KeyColumn = item.Key.ToString();
                        conceptProxyList.Insert(i, conceptProxy);
                        i++;
                    }
                }


                return(conceptProxyList);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public IList <DesignedColumnProxy> GetAllDesignedReportsPersonInfoProxyColumns(decimal reportId)
        {
            try
            {
                IList <DesignedColumnProxy>            designedColumnProxyList            = new List <DesignedColumnProxy>();
                IList <DesignedReportPersonInfoColumn> designedReportPersonInfoColumnList = repDesignedReportPersonInfoColumn.GetAll().ToList <DesignedReportPersonInfoColumn>();
                IList <PersonReserveField>             personReserveFieldList             = new List <PersonReserveField>();
                if (designedReportPersonInfoColumnList.Count(d => d != null && d.IsReserveField) > 0)
                {
                    personReserveFieldList = new BPersonReservedField().GetAll();
                }

                foreach (DesignedReportPersonInfoColumn item in designedReportPersonInfoColumnList)
                {
                    DesignedColumnProxy columnProxy = new DesignedColumnProxy();
                    if (item.IsReserveField)
                    {
                        string             itemKey = item.Key.ToString().Replace("prsTA_", "");
                        PersonReserveField personReserveFieldObj = personReserveFieldList.FirstOrDefault(r => r.OrginalName.ToLower().Trim() == itemKey.ToLower().Trim());
                        if (personReserveFieldObj != null)
                        {
                            columnProxy.Name = personReserveFieldObj.Lable;
                        }
                        else
                        {
                            switch (BLanguage.CurrentLocalLanguage)
                            {
                            case LanguagesName.Parsi:
                                columnProxy.Name = item.FnName;
                                break;

                            case LanguagesName.English:
                                columnProxy.Name = item.EnName;
                                break;

                            default:
                                columnProxy.Name = item.FnName;
                                break;
                            }
                        }
                    }
                    else
                    {
                        switch (BLanguage.CurrentLocalLanguage)
                        {
                        case LanguagesName.Parsi:
                            columnProxy.Name = item.FnName;
                            break;

                        case LanguagesName.English:
                            columnProxy.Name = item.EnName;
                            break;

                        default:
                            columnProxy.Name = item.FnName;
                            break;
                        }
                    }
                    columnProxy.ColumnType = DesignedReportColumnType.PersonInfo;
                    columnProxy.ID         = item.ID;
                    columnProxy.KeyColumn  = item.Key.ToString();
                    designedColumnProxyList.Add(columnProxy);
                }
                designedColumnProxyList = designedColumnProxyList.OrderBy(o => o.Name).ToList <DesignedColumnProxy>();
                Report             reportObj     = new BReport().GetByID(reportId);
                DesignedReportType reportTypeObj = GetAllDesignedReportsTypes().SingleOrDefault(d => d.CustomCode == DesignedReportTypeEnum.Daily);
                if (reportObj.DesignedType == reportTypeObj)
                {
                    IList <PersonParamField> personParamFieldList = new BPersonParamFields().GetAll().Where(p => p.Active && p.SubSystemId == SubSystemIdentifier.TimeAtendance).ToList();
                    foreach (PersonParamField item in personParamFieldList)
                    {
                        DesignedColumnProxy columnProxy = new DesignedColumnProxy(); DesignedReportPersonInfoColumn designedReportPersonInfoColumnObj = new DesignedReportPersonInfoColumn();
                        columnProxy.EnName = item.EnTitle;
                        columnProxy.FnName = item.FnTitle;
                        switch (BLanguage.CurrentLocalLanguage)
                        {
                        case LanguagesName.Parsi:
                            columnProxy.Name = item.FnTitle;
                            break;

                        case LanguagesName.English:
                            columnProxy.Name = item.EnTitle;
                            break;

                        default:
                            columnProxy.Name = item.FnTitle;
                            break;
                        }
                        columnProxy.ColumnType = DesignedReportColumnType.PersonParam;
                        columnProxy.ID         = item.ID;
                        columnProxy.KeyColumn  = item.Key;
                        designedColumnProxyList.Add(columnProxy);
                    }
                }

                return(designedColumnProxyList);
            }
            catch (Exception ex)
            {
                LogException(ex, "BDesignedReportsColumn", "GetAllDesignedReportsPersonInfoColumns");
                throw ex;
            }
        }