Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //TODO: check for all field validation
                if (Request["sql"] != null)
                {

                    string guid = Guid.NewGuid().ToString();
                    using (DataClasses1DataContext dc = new DataClasses1DataContext())
                    {
                        Query q = new Query();
                        q.GUID = guid;
                        q.catalog = Request["catalog"];
                        q.createdby = User.Identity.Name;
                        q.createdon = DateTime.Now;
                        q.enabled = true;
                        q.server = Request["server"];
                        q.sql = Request["sql"];
                        q.username = Request["username"];
                        q.password = Request["password"];
                        q.url = "/report.aspx?guid=" + Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(guid));
                        dc.Queries.InsertOnSubmit(q);
                        dc.SubmitChanges();

                    }

                    Response.Write(Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(guid)));

                }
            }catch (Exception ex){
                Response.Write("Trouble");
            }
        }
コード例 #2
0
 partial void UpdateQuery(Query instance);
コード例 #3
0
 partial void DeleteQuery(Query instance);
コード例 #4
0
 partial void InsertQuery(Query instance);