Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "myscript", @"<script type=""text/javascript"">
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(success);
    } else {
        alert(""Geo Location is not supported on your current browser!"");
    }
    function success(position) {
        var lat = position.coords.latitude;
document.getElementById('HiddenField1').value = lat.toLocaleString();
        var long = position.coords.longitude;
document.getElementById('HiddenField2').value = long.toLocaleString();
        var city = position.coords.locality;
        var myLatlng = new google.maps.LatLng(lat, long);
        var myOptions = {
            center: myLatlng,
            zoom: 12,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById(""map_canvas""), myOptions);
        var marker = new google.maps.Marker({
            position: myLatlng,
            title: ""lat: "" + lat + "" long: "" + long
        });
 
       
    }
</script>");

            uploaded_file up = new uploaded_file();

            us = (User)Session["user"];
            us = dd.Users.Where(w => w.ID == us.ID).SingleOrDefault();

            var ep = (from a in dd.uploaded_files
                      where a.Admin_id == us.ID
                      select new
            {
                a.ID,
                a.Uploaded_by,
                a.file_name,
                a.Admin_id,
                a.date_uploaded
            });

            GridView1.DataSource = ep;
            GridView1.DataBind();
        }
Пример #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            uploaded_file up = new uploaded_file();

            us = (User)Session["user"];
            us = dd.Users.Where(w => w.ID == us.ID).SingleOrDefault();

            var ep = (from a in dd.uploaded_files
                      where a.Admin_id == us.ID && a.file_name.StartsWith(TextBox1.Text)

                      select new
            {
                a.ID,
                a.Uploaded_by,
                a.file_name,
                a.Admin_id,
                a.date_uploaded
            });

            GridView1.DataSource = ep;
            GridView1.DataBind();
        }
Пример #3
0
 private void detach_uploaded_files(uploaded_file entity)
 {
     this.SendPropertyChanging();
     entity.User = null;
 }
Пример #4
0
 partial void Deleteuploaded_file(uploaded_file instance);
Пример #5
0
 partial void Updateuploaded_file(uploaded_file instance);
Пример #6
0
 partial void Insertuploaded_file(uploaded_file instance);