コード例 #1
0
 public static string[] FindSecondRoad(string contextKey, string prefixText)
 {
     using (TCService.TCSummaryClient db = new TCService.TCSummaryClient())
     {
         return(db.GetRoad2(contextKey, prefixText));
     }
 }
コード例 #2
0
 public static string[] FindSite(string prefixText)
 {
     using (TCService.TCSummaryClient db = new TCService.TCSummaryClient())
     {
         return(db.GetSiteID(prefixText));
     }
 }
コード例 #3
0
 public static string[] FindFirstRoad(string prefixText)
 {
     using (TCService.TCSummaryClient db = new TCService.TCSummaryClient())
     {
         return(db.GetRoad1(prefixText));
     }
 }
コード例 #4
0
        protected void gvTCHistory_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            try
            {
                string sUserName = System.Web.HttpContext.Current.User.Identity.Name.ToUpper().ToString().Replace(@"ROCKYVIEW\", "");

                TCService.TCSummaryClient _proxy = new TCService.TCSummaryClient();

                if (_proxy.GetUserNameByLogin(sUserName).Count() > 0)
                {
                    string siteID = e.Values["SiteID"].ToString();

                    using (TCInsertClient tc = new TCInsertClient())
                    {
                        tc.DelTCbySiteID(siteID);
                    }

                    gvTCHistory.DataSource = _proxy.GetTCSummaryByLoc(lblFirstRoad.Text, lblSecondRoad.Text, lblDir.Text);
                    gvTCHistory.DataBind();

                    lblResult.Text = siteID + " is deleted successfully";
                    Response.Write(siteID + " is deleted successfully");

                    //Page.Response.Redirect("TCHistory.aspx?Site=" + siteID);
                }
                else
                {
                    lblResult.Text = "You do not have permission to delete the record. Please contact GIS Department";
                    Response.Write("You do not have permission to delete the record. Please contact GIS Department");
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.ToString());
            }
        }