Esempio n. 1
0
        //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);
        }
Esempio n. 2
0
 partial void UpdateDRIVER(DRIVER instance);
Esempio n. 3
0
 partial void DeleteDRIVER(DRIVER instance);
Esempio n. 4
0
 partial void InsertDRIVER(DRIVER instance);