示例#1
0
 partial void Deleteusers(users instance);
示例#2
0
文件: comment.cs 项目: kioltk/mvc
 public void SetOwner(users owner)
 {
     _owner = owner;
 }
示例#3
0
 partial void Insertusers(users instance);
示例#4
0
 partial void Updateusers(users instance);
示例#5
0
		private void attach_users(users entity)
		{
			this.SendPropertyChanging();
			entity.cities = this;
		}
示例#6
0
		private void detach_users(users entity)
		{
			this.SendPropertyChanging();
			entity.cities = null;
		}
示例#7
0
文件: User.cs 项目: kioltk/mvc
 public User(users u)
 {
     _u = u;
 }
示例#8
0
文件: User.cs 项目: kioltk/mvc
 public User(users u, List<string> fields)
 {
     _u = u;
     _fields.AddRange(fields);
 }
示例#9
0
文件: Mission.cs 项目: kioltk/mvc
 public void SetUser(string token)
 {
     _u = DataBase.Users.GetByAccess(token);
 }
示例#10
0
文件: User.cs 项目: kioltk/mvc
 public UserView(users u)
 {
     _u = u;
     _acc = new AccountView(_u.accounts);
 }
示例#11
0
文件: Mission.cs 项目: kioltk/mvc
 public MissionNew(users u)
 {
     _u = u;
 }
示例#12
0
文件: Mission.cs 项目: kioltk/mvc
 public MissionNew()
 {
     _u = new users();
     title = GlobalRes.Title;
     description = GlobalRes.Description;
     city = GlobalRes.City;
 }
示例#13
0
文件: Mission.cs 项目: kioltk/mvc
 public Additional(mission m, users u)
 {
     _m = m;
 }
示例#14
0
文件: DataBase.cs 项目: kioltk/mvc
            /*    public static bool create(string login, string password, string email, string tel)
                {

                    int dat = Time.UNIXNow();
                    var acc = new accounts()
                    {
                        login = login,
                        password = password,
                        email = email,
                        tel = tel,
                        confirmation = CreateMD5Hash(login + dat.ToString())
                    };

                    context.accounts.InsertOnSubmit(acc);
                    try
                    {
                        Save();
                        var user = new users()
                        {
                            name = "В процессе...",
                            owner = acc.ID
                        };
                        context.users.InsertOnSubmit(user);
                        Save();
                        return true;
                    }
                    catch
                    {
                        return false;
                    }
                }
              */
            public static bool create(RegistrationView acc)
            {
                int dat = Time.UNIXNow();
                var accnew = new accounts()
                {
                    password = acc.password,
                    email = acc.email,
                    confirmation = "none"
                };

                context.accounts.InsertOnSubmit(accnew);
                try
                {
                    Save();
                    var user = new users()
                    {
                        name = "в процессе..",
                        owner = accnew.ID
                    };
                    context.users.InsertOnSubmit(user);
                    return Save();
                }
                catch
                {
                    return false;
                }
            }
示例#15
0
文件: DataBase.cs 项目: kioltk/mvc
 public static bool IsMissionAgent(int mid, users user)
 {
     var miss = context.mission.FirstOrDefault(m => m.ID == mid);
     if (miss != null)
         return miss.agent == user.ID;
     return false;
 }