Exemplo n.º 1
0
        public bool AddNewPath(String pathName, String pathPwd, String creator)
        {
            try
            {
                Int32 pathID = GetPathID(pathName);
                if (-1 != pathID)
                    return false;

                Path gpsPath = new Path();
                gpsPath.Name = Encode(pathName);
                gpsPath.Password = Encode(pathPwd);
                gpsPath.Added_By = Encode(creator);
                gpsPath.Visible = true;

                mGPSDB.Paths.InsertOnSubmit(gpsPath);

                mGPSDB.SubmitChanges();

                pathID = GetPathID(pathName);
                if (-1 == pathID)
                    return false;
            }
            catch (System.Exception)
            {
                return false;
            }
            
            return true;
        }
 partial void UpdatePath(Path instance);
 partial void DeletePath(Path instance);
 partial void InsertPath(Path instance);