Beispiel #1
0
 partial void Updatemission(mission instance);
Beispiel #2
0
 partial void Deletemission(mission instance);
Beispiel #3
0
		private void detach_mission1(mission entity)
		{
			this.SendPropertyChanging();
			entity.users1 = null;
		}
Beispiel #4
0
 partial void Insertmission(mission instance);
Beispiel #5
0
		private void detach_mission(mission entity)
		{
			this.SendPropertyChanging();
			entity.cities = null;
		}
Beispiel #6
0
		private void attach_mission1(mission entity)
		{
			this.SendPropertyChanging();
			entity.users1 = this;
		}
Beispiel #7
0
 public MissionView(mission m)
 {
     _m = m;
 }
Beispiel #8
0
		private void attach_mission(mission entity)
		{
			this.SendPropertyChanging();
			entity.cities = this;
		}
Beispiel #9
0
 public Additional(mission m, users u)
 {
     _m = m;
 }
Beispiel #10
0
 public Mission(mission m, List<string> fields)
 {
     _m = m;
     _fields.AddRange(fields) ;
 }
Beispiel #11
0
 public Mission(mission m)
 {
     _m = m;
 }
Beispiel #12
0
            public static bool create(MissionNew missionNew)
            {
                int dat = Time.UNIXNow();
                string s = null;
                if (missionNew.coords != null)
                {
                    s = missionNew.coords.ToString();
                }
                var NewMission = new mission()
                {
                    title = missionNew.title,
                    description = missionNew.description,
                    additional = missionNew.additional,
                    price = missionNew.price,
                    date = Time.UNIXNow(),
                    owner = missionNew.owner,
                    cid = missionNew.cid,
                    lifetime = missionNew.lifetime,
                    coords = s,
                    status = "opened"
                };

                context.mission.InsertOnSubmit(NewMission);
                try
                {
                    Save();
                    missionNew.id = NewMission.ID;
                    return true;
                }
                catch
                {
                    return false;
                }
            }
Beispiel #13
0
 public static bool create(string title, string description, int owner, int? cid, int? lifetime)
 {
     var m = new mission()
     {
         owner = owner,
         date = Time.UNIXNow(),
         description = description,
         title = title,
         status = "new"
     };
     try
     {
         context.mission.InsertOnSubmit(m);
         Save();
         return true;
     }
     catch (Exception exp)
     {
         return false;
     }
 }