partial void Updatemission(mission instance);
partial void Deletemission(mission instance);
private void detach_mission1(mission entity) { this.SendPropertyChanging(); entity.users1 = null; }
partial void Insertmission(mission instance);
private void detach_mission(mission entity) { this.SendPropertyChanging(); entity.cities = null; }
private void attach_mission1(mission entity) { this.SendPropertyChanging(); entity.users1 = this; }
public MissionView(mission m) { _m = m; }
private void attach_mission(mission entity) { this.SendPropertyChanging(); entity.cities = this; }
public Additional(mission m, users u) { _m = m; }
public Mission(mission m, List<string> fields) { _m = m; _fields.AddRange(fields) ; }
public Mission(mission m) { _m = m; }
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; } }
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; } }