Пример #1
0
        private static void FullSearch()
        {
            ParamBuilder oParamBuilder = new ParamBuilder();
            SearchResults = new List<Item>();

            oParamBuilder.addParam("sid", StaticSessionSettings.sessionID);
            oParamBuilder.addParam("q", "");

            var oComm = new Api();
            var result = oComm.getResponseFromOrb<List<Item>>(Api.mediasearch, oParamBuilder.GetParamList());

            List<Item> Temp = new List<Item>();

            Temp = result;

            SearchResults.Clear();

            foreach (var item in Temp)
            {
                if (!string.IsNullOrWhiteSpace(item.field))
                    SearchResults.Add(item);
            }

            iveFullySearched = true;
        }
Пример #2
0
        public bool sessionkeepAlive()
        {
            var oParamBuilder = new ParamBuilder();
            
            var oComm = new Api();
            oParamBuilder.addParam("sid", StaticSessionSettings.sessionID);
            var result = oComm.getResponseFromOrb<Status>(Api.sessionkeepAlive, oParamBuilder.GetParamList());

            if (result.code == "0")
                return true;

            return false;
        }
Пример #3
0
        public bool sessionlogin(string username, string password)
        {
            StaticSessionSettings.username = username;
            StaticSessionSettings.password = password;

            var oComm = new Api();
            var oParamBuilder = new ParamBuilder();
            var blnLoggedIn = false;

            oParamBuilder.addParam("apiKey", StaticSessionSettings.applicationKey);
            oParamBuilder.addParam("l", StaticSessionSettings.username);
            oParamBuilder.addParam("password", StaticSessionSettings.password);

            var result = oComm.getResponseFromOrb<Status>(Api.sessionlogin, oParamBuilder.GetParamList());

            StaticSessionSettings.sessionID = result.orbSessionId;
           // if(result.code == "0") 
                blnLoggedIn = true;
            StaticSessionSettings.sessionExpireTime = result.maxInactiveInterval;
           
            return blnLoggedIn;
        }
Пример #4
0
 public int LoginPerson_DuplicationCheckDAL(Person objperson)
 {
     return(ExecuteScalarSPInt32("TMS_Person_DuplicationCheck",
                                 ParamBuilder.Par("Email", objperson.Email)
                                 ));
 }
Пример #5
0
 public IList <DDlList> ClassDDLDAL(string culture, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("TMS_ClassDDLAndCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));;
 }
Пример #6
0
 /// <summary>
 /// Classeses the by course identifier and culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <param name="CourseId">The course identifier.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> Classes_ByCourseIdAndCultureDAL(string culture, string CourseId, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("TMS_Classes_ByCourseIdAndCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("CourseId", CourseId), ParamBuilder.Par("OrganizationID", CompnayID)));;
 }
Пример #7
0
 /// <summary>
 /// Programs the languages get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> ProgramLanguages_GetAllByCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("ProgramLanguages_GetAllByCulture", ParamBuilder.Par("culture", culture)));;
 }
Пример #8
0
 //  IList<DDlList> CRM_Courses(string culture, long CompanyID);
 /// <summary>
 /// Currencieses the get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> Currencies_GetAllByCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("Currencies_GetAllByCulture", ParamBuilder.Par("culture", culture)));;
 }
Пример #9
0
 public IList <DDlList> HowHeard(string culture, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("HowHeard_ForCourseGetAllByCulture", ParamBuilder.Par("Culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));
 }
Пример #10
0
        public IList <Trainer> DeletedPerson_GetAllDAL(string culture, long ID, string SearchText)
        {
            List <Trainer> Person      = new List <Trainer>();
            var            date        = DateTime.Now.ToString("yyyy-MM-dd") + " " + CommonUtility.PersonFlagsClearingTime();
            var            _PersonData = ExecuteListSp <Trainer>("TMS_DeletedPerson_GetbyCulture", ParamBuilder.Par("@culture", culture), ParamBuilder.Par("@ID", ID), ParamBuilder.Par("SearchText", SearchText), ParamBuilder.Par("FlagDateTime", date));

            foreach (var single in _PersonData)
            {
                if (single.FlagCount > 0)
                {
                    single.Flags = ExecuteListSp <PersonFlagsNested>(@"TMS_PersonFlags_GetAllFlagIDs", ParamBuilder.Par("FlagIDs", single.FlagIDs));
                }
                //  Person = _PersonData.Read<Trainer>().AsList<Trainer>();
            }

            return(_PersonData);
        }
 public IList <DDlList> Venues_GetAllByCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulture", ParamBuilder.Par("culture", culture)));
 }
 public IList <DDlList> Venues_GetAllByCultureDAL(string culture, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));
 }
 /// <summary>
 /// Venues the get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <param name="OpenType">Type of the open.</param>
 /// <param name="OpenId">The open identifier.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> Venues_GetAllByClassDAL(string culture, int OpenType, long OpenId, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("VenueOpenMapping_GetByClassVenues", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OpenId", OpenId), ParamBuilder.Par("OpenType", 3)));
 }
        /// <summary>
        /// Venues the get all by culture dal.
        /// </summary>
        /// <param name="culture">The culture.</param>
        /// <param name="OpenType">Type of the open.</param>
        /// <param name="OpenId">The open identifier.</param>
        /// <returns>IList&lt;DDlList&gt;.</returns>
        public IList <DDlList> Venues_GetAllByCultureDAL(string culture, int OpenType, long OpenId, long CompnayID)
        {
            if (CompnayID > 0)
            {
                switch (OpenType)
                {
                case -1:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                case 3:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                case 2:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                default:
                    return(ExecuteListSp <DDlList>("Venues_ByOpenIdAndTypeAndCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OpenId", OpenId), ParamBuilder.Par("OpenType", OpenType), ParamBuilder.Par("OrganizationID", CompnayID)));
                }
            }
            else
            {
                switch (OpenType)
                {
                case -1:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                case 3:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                case 2:
                    return(ExecuteListSp <DDlList>("Venues_ForCourseGetAllByCulturebyOrg", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));

                default:
                    return(ExecuteListSp <DDlList>("Venues_ByOpenIdAndTypeAndCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OpenId", OpenId), ParamBuilder.Par("OpenType", OpenType), ParamBuilder.Par("OrganizationID", CompnayID)));
                }
            }
        }
 /// <summary>
 /// Manages the venues duplication check dal.
 /// </summary>
 /// <param name="_mapping">The mapping.</param>
 /// <returns>System.Int32.</returns>
 public int ManageVenues_DuplicationCheckDAL(VenueOpenMapping _mapping)
 {
     return(ExecuteScalarSPInt32("VenueOpenMapping_DuplicationCheck",
                                 ParamBuilder.Par("VenueID", _mapping.VenueID),
                                 ParamBuilder.Par("OpenId", _mapping.OpenId), ParamBuilder.Par("OpenType", _mapping.OpenType)));
 }
Пример #16
0
 public int DeletePerson_CheckDAL(ClassTrainerMapping classTrainerMapping)
 {
     return(ExecuteScalarSPInt32("TMS_TrainerClassMapping_GetAll",
                                 ParamBuilder.Par("PersonID", classTrainerMapping.PersonID)
                                 ));
 }
Пример #17
0
 public void TestSeparator() {
     _builder = new ParamBuilder( "'", ";" );
     _builder.Add( "a" );
     _builder.Add( "b" );
     Assert.AreEqual( "a;b", _builder.GetResult() );
 }
Пример #18
0
 /// <summary>
 /// 单击刷新面板
 /// </summary>
 /// <param name="panelId">面板编号</param>
 /// <param name="url">服务端Url</param>
 /// <param name="paramName">参数</param>
 /// <param name="fnCreateUrl">用于创建Url的回调函数</param>
 public void RefreshPanel( string panelId, string url, string paramName, string fnCreateUrl = "" ) {
     var builder = new ParamBuilder();
     builder.Add( panelId, "''", true );
     builder.Add( url, "''", true );
     builder.Add( paramName, "''", true );
     builder.Add( fnCreateUrl, "null" );
     OnClick( string.Format( "$.easyui.clickTreeNodeRefreshPanel_onClick({0})", builder.GetResult() ) );
 }
Пример #19
0
 /// <summary>
 /// Degrees the certificates duplication check dal.
 /// </summary>
 /// <param name="_objDegreeCertificates">The object degree certificates.</param>
 /// <returns>System.Int32.</returns>
 public int DegreeCertificates_DuplicationCheckDAL(DegreeCertificates _objDegreeCertificates)
 {
     return(ExecuteScalarSPInt32("TMS_DegreeCertificates_DuplicationCheck",
                                 ParamBuilder.Par("ID", _objDegreeCertificates.ID),
                                 ParamBuilder.Par("PrimaryName", _objDegreeCertificates.PrimaryName)));
 }
Пример #20
0
 /// <summary>
 /// Courses the categories get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <param name="CategoryType">Type of the category.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> CourseCategories_GetAllByCultureDAL(string culture, int CategoryType, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("TMS_Categories_GetAllByCulture",
                                    ParamBuilder.Par("CategoryType", CategoryType), ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));
 }
Пример #21
0
        /// <summary>
        /// TMSs the attachment get by identifier and type dal.
        /// </summary>
        /// <param name="OpenId">The open identifier.</param>
        /// <param name="OpenType">Type of the open.</param>
        /// <returns>IList&lt;TMS_Attachments&gt;.</returns>
        public IList <TMS_Attachments> TMS_Attachment_GetByIdAndTypeDAL(long OpenId, int OpenType)
        {
            List <TMS_Attachments> localList = new List <TMS_Attachments>
            {
                ProfileAndLogoFromDatabase(OpenId, OpenType)
            };

            localList.AddRange(ExecuteListSp <TMS_Attachments>("TMS_Attachments_GetbyIdandType", ParamBuilder.Par("OpenId", OpenId), ParamBuilder.Par("OpenType", OpenType)));
            return(localList);
        }
Пример #22
0
 public IList <DDlList> CRM_Users(string culture, long CompnayID)
 {
     return(ExecuteListSp <DDlList>("CRM_User_GetAllByCulture", ParamBuilder.Par("Culture", culture), ParamBuilder.Par("OrganizationID", CompnayID)));
 }
Пример #23
0
        /// <summary>
        /// Profiles the and logo from database.
        /// </summary>
        /// <param name="OpenId">The open identifier.</param>
        /// <param name="OpenType">Type of the open.</param>
        /// <returns>TMS_Attachments.</returns>
        internal TMS_Attachments ProfileAndLogoFromDatabase(long OpenId, int OpenType)
        {
            var model = ExecuteSinglewithSP <TMS_Attachments>("TMS_Attachments_GetProfileLogobyIdandType", ParamBuilder.Par("OpenId", OpenId), ParamBuilder.Par("OpenType", OpenType));

            if (model == null)
            {
                TMS_Attachments LocalModel = new TMS_Attachments()
                {
                    ID = -1, FileType = AttachmentsFileType.AttachmentsFileType_ProfilePicture, FileName = "people.png", FilePath = "~/images/i/"
                };
                model = LocalModel;
            }
            return(model);
        }
Пример #24
0
 /// <summary>
 /// Currencieses the get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> CurrenciesbyOrganization_GetAllByCultureDAL(string culture, long Oid)
 {
     return(ExecuteListSp <DDlList>("Currencies_GetAllByCultureAndOrganization", ParamBuilder.Par("culture", culture), ParamBuilder.Par("Oid", Oid)));;
 }
Пример #25
0
 /// <summary>
 /// TMSs the attachment get single by identifier and type dal.
 /// </summary>
 /// <param name="ID">The identifier.</param>
 /// <returns>TMS_Attachments.</returns>
 public TMS_Attachments TMS_Attachment_GetSingleByIdAndTypeDAL(long ID)
 {
     return(ExecuteSinglewithSP <TMS_Attachments>("TMS_Attachments_GetSinglebyIdandType", ParamBuilder.Par("ID", ID)));
 }
Пример #26
0
 /// <summary>
 /// Courseses the get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> Courses_GetAllByCultureDAL(string culture, long CompanyID)
 {
     return(ExecuteListSp <DDlList>("TMS_Courses_GetAllByCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", CompanyID)));;
 }
Пример #27
0
        /// <returns>List&lt;Classes&gt;.</returns>
        public IList <FocusAreas> TMS_CourseFocusArea_GetAllDAL(long CourseId)
        {
            var _CourseLanguageData = ExecuteListSp <FocusAreas>(@"TMS_CourseFocusArea_GetAll", ParamBuilder.Par("CourseID", CourseId));

            return(_CourseLanguageData);
        }
Пример #28
0
 /// <summary>
 /// Roleses the get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> Roles_GetAllByCultureDAL(string culture, long oid) => ExecuteListSp <DDlList>("Roles_GetAllByCulture", ParamBuilder.Par("culture", culture), ParamBuilder.Par("OrganizationID", oid));
Пример #29
0
        //public struct channel
        //{
        //    public string orbTitle;
        //    public string orbMediumID;
        //    public bool isFavorite;


        //    public ListItem listItem
        //    {
        //        get
        //        {
        //            string strFav;
        //            if (isFavorite)
        //            {
        //                strFav = " (FAV)";
        //            }
        //            else
        //            {
        //                strFav = "";
        //            }

        //            return new ListItem(orbMediumID, orbTitle + strFav);
        //        }
        //        set { value = listItem; }
        //    }
        //}


        //public ListItem GetChannelByName(string name)
        //{

        //    string title;
        //    // title = string.
        //    title = name.Replace(" (FAV)", "");
        //    title = title.Trim();

        //    for (int i = 0; i == 1024; i++)
        //    {
        //        Debug.Print(arrChannels[i].orbTitle);
        //        if (arrChannels[i].orbTitle == title)
        //        {
        //            return arrChannels[i]
        //                .listItem;
        //        }

        //    }
        //    return null;
        //}


        //public void RetrieveChannels()
        //{
        //    emptyArray();
        //    int intCounter = 1;

        //    var oComm = new Api();
        //    var oReader = oComm.ConvertStringToXmlReader(oComm.getResponseFromOrb(Api.tvgetListings, "sid=" + SessionSettings.sessionID));
        //    while (oReader.Read())
        //    {
        //        if (oReader.NodeType == XmlNodeType.Element)
        //        {
        //            if (oReader.Name == "channel")
        //            {
        //                arrChannels[intCounter] = new channel();
        //                arrChannels[intCounter].orbMediumID = oReader.GetAttribute("orbMediumId");
        //                arrChannels[intCounter].orbTitle = oReader.GetAttribute("title");
        //                if (Convert.ToInt16(oReader.GetAttribute("rating")) > 0)
        //                {
        //                    arrChannels[intCounter].isFavorite = true;
        //                }
        //                intCounter = intCounter + 1;

        //            }
        //        }
        //    }
        //    lastChannel = intCounter;
        //}

        //public ListItem GetChannel(int num)
        //{
        //    return arrChannels[num].listItem;
        //}

        //public ListItem GetChannel(string mediumid)
        //{
        //    dynamic intTeller = null;
        //    for (intTeller = 1; intTeller <= 1024; intTeller++)
        //    {
        //        if (arrChannels[intTeller].orbMediumID == mediumid)
        //        {
        //            return arrChannels[intTeller].listItem;
        //        }
        //    }
        //    return null;
        //}

        //public ListItem GetChannelByTitle(string title)
        //{
        //    dynamic intTeller = null;
        //    for (intTeller = 1; intTeller <= 1024; intTeller++)
        //    {
        //        if (arrChannels[intTeller].orbTitle == title)
        //        {
        //            return arrChannels[intTeller].listItem;
        //        }
        //    }
        //    return null;
        //}

        //public void emptyArray()
        //{
        //    lastChannel = 0;
        //}


        public string GetStreamingUri(string format, string orbMediumID, string type = TYPE_PC, int width = 0, int height = 0)
        {
            if (string.IsNullOrEmpty(orbMediumID))
                throw new OrbInternalError();

            var oParamBuilder = new ParamBuilder();
          
            oParamBuilder.addParam("sid",StaticSessionSettings.sessionID);
            oParamBuilder.addParam("streamFormat", format);
            oParamBuilder.addParam("mediumId", orbMediumID);
            oParamBuilder.addParam("type",type);
            if (height > 0)
                oParamBuilder.addParam("height", height.ToString());
            if (width > 0)
                oParamBuilder.addParam("width", width.ToString());

            Api oComm = new Api();

            var url = oComm.getManualAttributeFromOrbXmlNode(Api.Stream, oParamBuilder.GetParamList(), "item", "url");
            
            

            return url;
        }
Пример #30
0
 public IList <DDlList> Resources_GetAllbyCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("TMS_ResourcesDLL", ParamBuilder.ParNVarChar("culture", culture, 5)));
 }
Пример #31
0
 /// <summary>
 /// Logins the users duplication check dal.
 /// </summary>
 /// <param name="_objUsers">The object users.</param>
 /// <returns>System.Int32.</returns>
 public int LoginUsers_DuplicationCheckDAL(LoginUsers _objUsers)
 {
     return(ExecuteScalarSPInt32("TMS_Users_DuplicationCheck",
                                 ParamBuilder.Par("Email", _objUsers.Email)
                                 ));
 }
Пример #32
0
 /// <summary>
 /// Cores the cities region get allby culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <param name="RegionId">The region identifier.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> CoreCitiesRegion_GetAllbyCultureDALbyOrganization(string culture, int RegionId, string Oid)
 {
     return(ExecuteListSp <DDlList>("CoreCitiesRegionAndCountriesWise_GetByRegionIDCultureOrganization", ParamBuilder.ParNVarChar("Culture", culture, 5), ParamBuilder.Par("RegionId", RegionId), ParamBuilder.Par("Oid", Oid)));
 }
Пример #33
0
 /// <summary>
 /// Countries the code get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> NationalityCode_GetAllByCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("NationalityCode_GetAllByCulture", ParamBuilder.ParNVarChar("Culture", culture, 5)));
 }
Пример #34
0
 public void TestQuotes() {
     _builder = new ParamBuilder( "\"" );
     _builder.Add( "a",true );
     _builder.Add( "b" );
     Assert.AreEqual( "\"a\",b", _builder.GetResult() );
 }
Пример #35
0
        /// <summary>
        /// Persons the get allfor DDL dal.
        /// </summary>
        /// <returns>IList&lt;DDlList&gt;.</returns>
        public IList <DDlList> PersonGetAllforDDL_DAL(long CompanyID)
        {
            //  return ExecuteListSp<DDlList>("TMS_PersonDDL");

            return(ExecuteListSp <DDlList>("TMS_PersonDDL", ParamBuilder.Par("OrganizationID", CompanyID)));
        }
Пример #36
0
 public void TestInit() {
     _builder = new ParamBuilder();
 }
Пример #37
0
 /// <summary>
 /// Organizations the person relation types get all by culture dal.
 /// </summary>
 /// <param name="culture">The culture.</param>
 /// <returns>IList&lt;DDlList&gt;.</returns>
 public IList <DDlList> OrganizationPersonRelationTypes_GetAllByCultureDAL(string culture)
 {
     return(ExecuteListSp <DDlList>("TMS_OrganizationPersonRelationTypes_GetAllByCulture", ParamBuilder.ParNVarChar("Culture", culture, 5)));
 }
Пример #38
0
 /// <summary>
 /// 设置右键菜单
 /// </summary>
 /// <param name="treeId">树Id</param>
 /// <param name="menuId">菜单Id</param>
 public void Menu( string treeId = "", string menuId = "" ) {
     var builder = new ParamBuilder();
     builder.Add( treeId, "''", true );
     builder.Add( menuId, true );
     OnContextMenu( string.Format( "$.easyui.showTreeMenu_onContextMenu({0})", builder.GetResult() ) );
 }
Пример #39
0
        public IList <Trainer> Trainer_GetAllDAL(string Culture, long RoleID, string oid, string SearchText)
        {
            //using (var conn = new SqlConnection(DBHelper.ConnectionString))
            //{
            //    conn.Open();
            //    DynamicParameters dbParam = new DynamicParameters();
            //    var date = DateTime.Now.ToString("yyyy-MM-dd") + " " + CommonUtility.PersonFlagsClearingTime();

            //    dbParam.AddDynamicParams(new { culture = Culture, RoleID = RoleID, oid = oid, StartRowIndex = StartRowIndex, PageSize = PageSize, SortExpression = SortExpression, SearchText = SearchText, FlagDateTime = date });
            //    using (var multi = conn.QueryMultiple("TMS_Trainer_GetByCulture", dbParam, commandType: System.Data.CommandType.StoredProcedure))
            //    {
            //        Person = multi.Read<Trainer>().AsList<Trainer>();
            //        if (!multi.IsConsumed)
            //            Total = multi.Read<int>().FirstOrDefault<int>();
            //        foreach (var single in Person)
            //        {
            //            if (single.FlagCount > 0)
            //            {
            //                single.Flags = ExecuteListSp<PersonFlagsNested>(@"TMS_PersonFlags_GetAllFlagIDs", ParamBuilder.Par("FlagIDs", single.FlagIDs));

            //                // single.Flags = ExecuteListSp<PersonFlagsNested>(@"TMS_PersonFlags_GetAllFlagIDs", ParamBuilder.Par("FlagIDs", single.FlagIDs));
            //            }
            //        }
            //    }

            //    conn.Close();

            //}
            //return Person.ToList();
            //ParamBuilder.Par("StartRowIndex", StartRowIndex), ParamBuilder.Par("PageSize", PageSize), ParamBuilder.Par("SortExpression", SortExpression),
            List <Trainer> Person      = new List <Trainer>();
            var            date        = DateTime.Now.ToString("yyyy-MM-dd") + " " + CommonUtility.PersonFlagsClearingTime();
            var            _PersonData = ExecuteListSp <Trainer>("TMS_Trainer_GetByCulture", ParamBuilder.Par("@culture", Culture), ParamBuilder.Par("@RoleID", RoleID), ParamBuilder.Par("@oid", oid), ParamBuilder.Par("SearchText", SearchText), ParamBuilder.Par("FlagDateTime", date));

            foreach (var single in _PersonData)
            {
                if (single.FlagCount > 0)
                {
                    single.Flags = ExecuteListSp <PersonFlagsNested>(@"TMS_PersonFlags_GetAllFlagIDs", ParamBuilder.Par("FlagIDs", single.FlagIDs));
                }
            }
            return(_PersonData);
        }