コード例 #1
0
        private void BindAssignExerciseValues()
        {
            try
            {
                var objAssignExercise = ExerciseController.GetAssignExrciseByMember(MemberId);

                ddlMembers.SelectedValue = MemberId.ToString();
                BodyType = objAssignExercise[0].bodyTypeId.Value;

                ddlBodyType.SelectedValue = objAssignExercise[0].bodyTypeId.ToString();
                var lstNonArobicExercises = objAssignExercise.Where(x => x.ExerciseCardMaster.exerciseTypeId == 2).ToList();
                ddlLevel.SelectedValue = lstNonArobicExercises[0].levelId == null ? "0" : lstNonArobicExercises[0].levelId.ToString();
                LevelId = lstNonArobicExercises[0].levelId.Value;

                lstArobicExercise.DataSource = ExerciseController.GetArobicExercise(BodyType, MemberId, LoginUser.ClubId);
                lstArobicExercise.DataBind();

                lstNonArobicExercise.DataSource = ExerciseController.GetNonArobicExercise(BodyType, LevelId, MemberId, LoginUser.ClubId);
                lstNonArobicExercise.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
 public MethodInfo GetMethod(string name, Type[] types)
 {
     if (name == SubMethodInfo.ExecuteForEachItem)
     {
         return(new ListForEachMethodInfo(typeof(String), MemberId.ToString("x")));
     }
     else
     {
         Type       t   = WrappedType;
         MethodInfo mif = t.GetMethod(name, types);
         if (mif == null)
         {
             Type[] tps = t.GetInterfaces();
             if (tps != null && tps.Length > 0)
             {
                 for (int i = 0; i < tps.Length; i++)
                 {
                     mif = tps[i].GetMethod(name, types);
                     if (mif != null)
                     {
                         break;
                     }
                 }
             }
         }
         return(mif);
     }
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            hdnId.Value = MemberId.ToString();

            if (!Page.IsPostBack)
            {
                SecureUserGroupsModel model;
                model = client.GetUserAccessByID(UserID, ParlourId);

                BindBank();

                BindCountry();

                // BindReportData();
                //PolicyDoc.Enabled = false;
                rfvPassport.Enabled = false;

                LocalQoute = applictionLogo();
                if (Request.QueryString["ID"] != null)
                {
                    // PolicyDoc.Enabled = true;

                    //  BindMemberToUpdate();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "DisableControl", "$(\"#tab6\").hide();", true);
                }


                SuperUserRoles();
                //LoadUserRights();
            }
        }
コード例 #4
0
        public void TestEval01()
        {
            MemberId memberid = new MemberId("Name1");

            memberid.ToString();
            Result[] arrRes = new Result[0];
            //Test Procedure Call
            Result result = memberid.Eval(new Evaluator(), arrRes);

            //Post Condition Check
            Assert.AreEqual("Name1", result.Value);
        }
コード例 #5
0
        public XmlNode ToXml(XmlDocument d)
        {
            XmlNode tx = d.CreateElement("comment");

            tx.AppendChild(umbraco.xmlHelper.addCDataNode(d, "body", Body));

            tx.Attributes.Append(umbraco.xmlHelper.addAttribute(d, "id", Id.ToString()));
            tx.Attributes.Append(umbraco.xmlHelper.addAttribute(d, "topicId", TopicId.ToString()));
            tx.Attributes.Append(umbraco.xmlHelper.addAttribute(d, "memberId", MemberId.ToString()));

            tx.Attributes.Append(umbraco.xmlHelper.addAttribute(d, "created", Created.ToString()));

            return(tx);
        }
コード例 #6
0
        public void LoadMemberArticles(TaskScheduler uiContext)
        {
            memberArticles = new CodeProjectMemberArticles();

            Dictionary <String, String> param = new Dictionary <string, string> ();

            param.Add("Id", MemberId.ToString());

            ObjectBuilder objectBuilder = new ObjectBuilder();
            Task <IList <CodeProjectMemberArticle> > loadArticleTask = objectBuilder.FillListAsync(memberArticles, param, () => new CodeProjectMemberArticle(), CancellationToken.None);


            loadArticleTask.Start();
            loadArticleTask.ContinueWith(x => ArticlesLoaded(), uiContext);
        }
コード例 #7
0
        public void LoadMember(TaskScheduler uiContext)
        {
            Dictionary <String, String> param = new Dictionary <string, string> ();

            param.Add("Id", MemberId.ToString());

            Member    = new CodeProjectMember();
            Member.Id = MemberId;

            ObjectBuilder objectBuilder  = new ObjectBuilder();
            Task <object> fillMemberTask = objectBuilder.FillAsync(Member, param, CancellationToken.None);

            fillMemberTask.Start();
            fillMemberTask
            .ContinueWith(x => LoadGravatar())
            .ContinueWith(x => MemberLoaded(), uiContext);
        }
コード例 #8
0
        public void OnDeserialization(XmlNode objectNode)
        {
            _xmlNode = objectNode;
            if (_id == 0)
            {
                XmlNode idNode = _xmlNode.OwnerDocument.CreateElement(XmlTags.XML_PROPERTY);
                XmlUtil.SetNameAttribute(idNode, "MemberId");
                _xmlNode.AppendChild(idNode);
                idNode.InnerText = MemberId.ToString(System.Globalization.CultureInfo.InvariantCulture);
            }
            XmlNodeList nl = _xmlNode.SelectNodes(string.Format(System.Globalization.CultureInfo.InvariantCulture,
                                                                "{0}/{1}",
                                                                XML_VALUES, XmlTags.XML_Item));

            foreach (XmlNode nd in nl)
            {
                SetResourceString(XmlUtil.GetNameAttribute(nd), nd.InnerText);
            }
        }
コード例 #9
0
        public SortedDictionary <string, MethodInfo> GetMethods()
        {
            SortedDictionary <string, MethodInfo> methods = new SortedDictionary <string, MethodInfo>();
            Type t = WrappedType;

            MethodInfo[] mifs = t.GetMethods();
            for (int i = 0; i < mifs.Length; i++)
            {
                if (!mifs[i].IsSpecialName)
                {
                    string s = MethodPointer.GetMethodSignature(mifs[i]);
                    methods.Add(s, mifs[i]);
                }
            }
            Type[] tps = t.GetInterfaces();
            if (tps != null && tps.Length > 0)
            {
                for (int i = 0; i < tps.Length; i++)
                {
                    mifs = tps[i].GetMethods();
                    for (int k = 0; k < mifs.Length; k++)
                    {
                        if (!mifs[k].IsSpecialName)
                        {
                            string s = MethodPointer.GetMethodSignature(mifs[k]);
                            if (!methods.ContainsKey(s))
                            {
                                methods.Add(s, mifs[k]);
                            }
                        }
                    }
                }
            }
            ListForEachMethodInfo af = new ListForEachMethodInfo(typeof(String), MemberId.ToString("x"));

            methods.Add(af.Name, af);
            return(methods);
        }
コード例 #10
0
 public MethodInfo GetMethod(string name, Type[] types)
 {
     if (name == SubMethodInfo.ExecuteForEachItem)
     {
         DataTypePointer ti = new DataTypePointer(CollectionItemType.LibTypePointer.ClassType);
         if (ti.IsGenericParameter)
         {
             DataTypePointer dp = GetConcreteType(ti.BaseClassType);
             if (dp != null)
             {
                 ti.SetConcreteType(dp);
             }
         }
         return(new CollectionForEachMethodInfo(ti, CollectionType, MemberId.ToString("x")));
     }
     else
     {
         Type       t   = WrappedType;
         MethodInfo mif = t.GetMethod(name, types);
         if (mif == null)
         {
             Type[] tps = t.GetInterfaces();
             if (tps != null && tps.Length > 0)
             {
                 for (int i = 0; i < tps.Length; i++)
                 {
                     mif = tps[i].GetMethod(name, types);
                     if (mif != null)
                     {
                         break;
                     }
                 }
             }
         }
         return(mif);
     }
 }
コード例 #11
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "memberid": // Int
                return(MemberId.ToString(strFormat, formatProvider));

            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "membertype": // Int
                return(MemberType.ToString(strFormat, formatProvider));

            case "membername": // VarChar
                return(PropertyAccess.FormatString(MemberName, strFormat));

            case "declaration": // VarChar
                if (Declaration == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Declaration, strFormat));

            case "documentation": // NVarCharMax
                if (Documentation == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Documentation, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "appearedinversion": // VarChar
                return(PropertyAccess.FormatString(AppearedInVersion, strFormat));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "isdeprecated": // Bit
                return(IsDeprecated.ToString());

            case "deprecationmessage": // NVarChar
                if (DeprecationMessage == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecationMessage, strFormat));

            case "documentationid": // Int
                if (DocumentationId == null)
                {
                    return("");
                }
                ;
                return(((int)DocumentationId).ToString(strFormat, formatProvider));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "fullname": // VarChar
                return(PropertyAccess.FormatString(FullName, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
コード例 #12
0
        public XmlNode ToXml(XmlDocument xmlDocument)
        {
            XmlNode topicXml = xmlDocument.CreateElement("topic");

            topicXml.AppendChild(umbraco.xmlHelper.addTextNode(xmlDocument, "title", Title));
            topicXml.AppendChild(umbraco.xmlHelper.addCDataNode(xmlDocument, "body", Body));

            topicXml.AppendChild(umbraco.xmlHelper.addTextNode(xmlDocument, "urlname", UrlName));

            // tags
            XmlNode tags = umbraco.xmlHelper.addTextNode(xmlDocument, "tags", "");

            foreach (var tag in Tags)
            {
                var tagNode = umbraco.xmlHelper.addTextNode(xmlDocument, "tag", tag.Name);
                tagNode.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "id", tag.Id.ToString()));
                tagNode.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "weight", tag.Weight.ToString()));
                tags.AppendChild(tagNode);
                tags.AppendChild(tagNode);
            }
            topicXml.AppendChild(tags);

            if (topicXml.Attributes != null)
            {
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "id", Id.ToString(CultureInfo.InvariantCulture)));
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "parentId", ParentId.ToString(CultureInfo.InvariantCulture)));
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "memberId", MemberId.ToString(CultureInfo.InvariantCulture)));

                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "latestReplyAuthor", LatestReplyAuthor.ToString(CultureInfo.InvariantCulture)));

                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "created", Created.ToString(CultureInfo.InvariantCulture)));
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "updated", Updated.ToString(CultureInfo.InvariantCulture)));

                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "locked", Locked.ToString()));
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "replies", Replies.ToString(CultureInfo.InvariantCulture)));

                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "answer", Answer.ToString()));
                topicXml.Attributes.Append(umbraco.xmlHelper.addAttribute(xmlDocument, "score", Score.ToString()));
            }

            return(topicXml);
        }
コード例 #13
0
 /// <inheritdoc/>
 protected override string OnComputeId()
 {
     return($"{GetType().Name}[{MemberId?.ToString() ?? string.Empty},{TeamId?.ToString() ?? string.Empty},{Property?.ToString() ?? string.Empty}]");
 }
コード例 #14
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "codeblockid": // Int
                return(CodeBlockId.ToString(strFormat, formatProvider));

            case "memberid": // Int
                return(MemberId.ToString(strFormat, formatProvider));

            case "version": // VarChar
                return(PropertyAccess.FormatString(Version, strFormat));

            case "codehash": // Char
                return(PropertyAccess.FormatString(CodeHash, strFormat));

            case "startline": // Int
                if (StartLine == null)
                {
                    return("");
                }
                ;
                return(((int)StartLine).ToString(strFormat, formatProvider));

            case "startcolumn": // Int
                if (StartColumn == null)
                {
                    return("");
                }
                ;
                return(((int)StartColumn).ToString(strFormat, formatProvider));

            case "endline": // Int
                if (EndLine == null)
                {
                    return("");
                }
                ;
                return(((int)EndLine).ToString(strFormat, formatProvider));

            case "endcolumn": // Int
                if (EndColumn == null)
                {
                    return("");
                }
                ;
                return(((int)EndColumn).ToString(strFormat, formatProvider));

            case "filename": // NVarChar
                if (FileName == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(FileName, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
コード例 #15
0
 public GenerateFeedCommand(MemberId memberId)
 {
     MemberId = memberId.ToString();
 }
コード例 #16
0
        public string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "moduleid": // Int
                return(ModuleId.ToString(strFormat, formatProvider));

            case "namespaceid": // Int
                return(NamespaceId.ToString(strFormat, formatProvider));

            case "classid": // Int
                return(ClassId.ToString(strFormat, formatProvider));

            case "memberid": // Int
                return(MemberId.ToString(strFormat, formatProvider));

            case "maintype": // Int
                if (MainType == null)
                {
                    return("");
                }
                ;
                return(((int)MainType).ToString(strFormat, formatProvider));

            case "subtype": // Int
                if (SubType == null)
                {
                    return("");
                }
                ;
                return(((int)SubType).ToString(strFormat, formatProvider));

            case "name": // NVarChar
                return(PropertyAccess.FormatString(Name, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "pendingdescription": // NVarCharMax
                if (PendingDescription == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(PendingDescription, strFormat));

            case "isdeprecated": // Int
                return(IsDeprecated.ToString(strFormat, formatProvider));

            case "deprecatedinversion": // VarChar
                if (DeprecatedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DeprecatedInVersion, strFormat));

            case "disappearedinversion": // VarChar
                if (DisappearedInVersion == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DisappearedInVersion, strFormat));

            case "lastmodifiedbyuserid": // Int
                if (LastModifiedByUserID == null)
                {
                    return("");
                }
                ;
                return(((int)LastModifiedByUserID).ToString(strFormat, formatProvider));

            case "lastmodifiedondate": // DateTime
                if (LastModifiedOnDate == null)
                {
                    return("");
                }
                ;
                return(((DateTime)LastModifiedOnDate).ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                return("");

                break;
            }
        }
コード例 #17
0
        public SortedDictionary <string, MethodInfo> GetMethods()
        {
            SortedDictionary <string, MethodInfo> methods = new SortedDictionary <string, MethodInfo>();
            Type t = WrappedType;

            MethodInfo[] mifs = t.GetMethods();
            for (int i = 0; i < mifs.Length; i++)
            {
                if (!mifs[i].IsSpecialName)
                {
                    string s = MethodPointer.GetMethodSignature(mifs[i]);
                    methods.Add(s, mifs[i]);
                }
            }
            Type[] tps = t.GetInterfaces();
            if (tps != null && tps.Length > 0)
            {
                for (int i = 0; i < tps.Length; i++)
                {
                    mifs = tps[i].GetMethods();
                    for (int k = 0; k < mifs.Length; k++)
                    {
                        if (!mifs[k].IsSpecialName)
                        {
                            string s = MethodPointer.GetMethodSignature(mifs[k]);
                            if (!methods.ContainsKey(s))
                            {
                                methods.Add(s, mifs[k]);
                            }
                        }
                    }
                }
            }
            DataTypePointer ti = new DataTypePointer(CollectionItemType.LibTypePointer.ClassType);

            if (ti.IsGenericParameter)
            {
                DataTypePointer dp = GetConcreteType(ti.BaseClassType);
                if (dp != null)
                {
                    ti.SetConcreteType(dp);
                }
            }
            CollectionForEachMethodInfo af = new CollectionForEachMethodInfo(ti, CollectionType, MemberId.ToString("x"));

            methods.Add(af.Name, af);
            return(methods);
        }
コード例 #18
0
        public SortedDictionary <string, MethodInfo> GetMethods()
        {
            bool bClientOnly = false;
            bool isWebPage   = false;

            if (this.RootPointer != null)
            {
                isWebPage = this.RootPointer.IsWebPage;
                if (this.RunAt == EnumWebRunAt.Client)
                {
                    bClientOnly = true;
                }
            }
            SortedDictionary <string, MethodInfo> methods = new SortedDictionary <string, MethodInfo>();
            Type t = WrappedType;

            MethodInfo[] mifs = t.GetMethods();
            for (int i = 0; i < mifs.Length; i++)
            {
                if (!mifs[i].IsSpecialName)
                {
                    if (bClientOnly)
                    {
                        bool include = false;
                        if (!string.IsNullOrEmpty(mifs[i].Name))
                        {
                            if (string.CompareOrdinal(mifs[i].Name, "Get") == 0)
                            {
                                include = true;
                            }
                            else if (string.CompareOrdinal(mifs[i].Name, "Set") == 0)
                            {
                                include = true;
                            }
                        }
                        if (!include)
                        {
                            continue;
                        }
                    }
                    string s = MethodPointer.GetMethodSignature(mifs[i]);
                    methods.Add(s, mifs[i]);
                }
            }
            Type[] tps = t.GetInterfaces();
            if (tps != null && tps.Length > 0)
            {
                for (int i = 0; i < tps.Length; i++)
                {
                    mifs = tps[i].GetMethods();
                    for (int k = 0; k < mifs.Length; k++)
                    {
                        if (!mifs[k].IsSpecialName)
                        {
                            if (bClientOnly)
                            {
                                bool include = false;
                                if (!string.IsNullOrEmpty(mifs[k].Name))
                                {
                                    if (string.CompareOrdinal(mifs[k].Name, "Get") == 0)
                                    {
                                        include = true;
                                    }
                                    else if (string.CompareOrdinal(mifs[k].Name, "Set") == 0)
                                    {
                                        include = true;
                                    }
                                }
                                if (!include)
                                {
                                    continue;
                                }
                            }
                            string s = MethodPointer.GetMethodSignature(mifs[k]);
                            if (!methods.ContainsKey(s))
                            {
                                methods.Add(s, mifs[k]);
                            }
                        }
                    }
                }
            }
            ArrayForEachMethodInfo af = new ArrayForEachMethodInfo(ArrayItemType.LibTypePointer.ClassType, MemberId.ToString("x"));

            methods.Add(af.Name, af);
            return(methods);
        }