//add a driver public static bool AddDriver(int id, string name, string idcard, string address, string phone) { bool rt = true; using (var httn = new TruckDataDataContext()) { DRIVER t = new DRIVER { ID = id, NAME = name, IDCARD = idcard, ADDRESS = address, PHONE = phone }; httn.DRIVERs.InsertOnSubmit(t); try { httn.SubmitChanges(); } catch { rt = false; } } return(rt); }
partial void UpdateDRIVER(DRIVER instance);
partial void DeleteDRIVER(DRIVER instance);
partial void InsertDRIVER(DRIVER instance);