关于个人资料状态 [英] regarding a profile status

查看:73
本文介绍了关于个人资料状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我正在工作门户网站上.
原始用户可以输入多个配置文件.
我正在gridview.now中显示所有配置文件,我的要求是什么,
应该有一个状态链接,其中包含他的所有个人资料(以位为单位).

示例:这是我的gridview
jobseekerid Profileid状态
1 2活动中
1 3停用
1 4停用
1 5停用
1 6停用

在所有这些中,只有一个配置文件可以处于活动状态.
因此,当uaser单击任何决定性配置文件时,它将变为活动状态,然后所有
剩余的个人资料将失效.
条件是一次只能激活一个配置文件.(当他使一个配置文件保持活动状态时,该配置文件将自动停用)
现在问题是当用户在gridview中激活配置文件时,我无法使所有其余配置文件均停用.
请帮帮我.
在此先感谢大家

解决方案

如果可以像这样设计类,请首先在这种情况下

    public class JobSeker
    {
        public string ID { get; set; }
        public List<profile> ProfileCollection { get; set; }
    }
    public class Profile
    {
        public string ID { get; set; }
        public bool isActive { get; set; }
    }
</profile>



现在,您可以根据单击的配置文件遍历所有配置文件,并可以更改Active属性.请问一个问题或说明那是什么不起作用以及应该怎么做.


hello friends ,
i am working on a job portal site.
heere user can enter multiple profiles .
i am showing all profiles in gridview.now what my requirement is ,
there should be a status link with his all profiles(it is in bit) .

Example:this is my gridview
jobseekerid Profileid status
1 2 Active
1 3 DeActive
1 4 DeActive
1 5 DeActive
1 6 DeActive

From all of this only one profile can be active.
so wwhen uaser will click on any decative profile ,it will become active and then all
remaining profile will become deactive.
condition is at a time only one profile can be active .(when he make his one profile active remaining will become deactivative automatically)
now problum is i am not able to making all the remaining profiles deactive when user make a profile active in gridview .
Please help me .
Thank You All in Advance

解决方案

In that scenario first if you can design your classes like that

    public class JobSeker
    {
        public string ID { get; set; }
        public List<profile> ProfileCollection { get; set; }
    }
    public class Profile
    {
        public string ID { get; set; }
        public bool isActive { get; set; }
    }
</profile>



Now you can traverse the all the profiles based on the clicked profile and can alter the Active property.


You haven''t actually asked a question, you have only stated what you are doing. Please ask a question or state what it is that''s not working and what it should be doing.


这篇关于关于个人资料状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆