コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["uid"] == null)
            {
                Response.Redirect("Default.aspx");
            }

            if (Page.IsPostBack)
            {
                adminDBDataContext admindb = new adminDBDataContext();
                popup popupData            = new popup();
                popupData.title   = Request["title"];
                popupData.details = Request["details"];
                popupData.button1 = Request["button1"];
                popupData.button2 = Request["button2"];
                admindb.popups.InsertOnSubmit(popupData);
                admindb.SubmitChanges();
            }
            adminDBDataContext admindbc = new adminDBDataContext();

            if (admindbc.popups.Count() > 0)
            {
                popupD = admindbc.popups.ToList().Last();
            }
            else
            {
                popupD = new popup();
            }
        }
コード例 #2
0
 partial void Updatepopup(popup instance);
コード例 #3
0
 partial void Deletepopup(popup instance);
コード例 #4
0
 partial void Insertpopup(popup instance);