예제 #1
0
        protected void BtnOk_Click(object sender, EventArgs e)
        {
            Business.thetitle     thetitle     = new Business.thetitle();
            Business.thetitleData thetitledata = new Business.thetitleData();

            thetitledata.hwid     = hwid.Text;
            thetitledata.thetitle = thetitles.Text;
            thetitledata.memos    = memos.Text;


            if (Request.QueryString["id"] != null)
            {
                thetitledata.Id = Request.QueryString["id"];
                thetitle.Modify(thetitledata);
            }
            else
            {
                thetitle.Insert(thetitledata);
            }

            Response.Redirect("thetitletb.aspx");

            thetitle     = null;
            thetitledata = null;
        }
예제 #2
0
        protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string Id = e.CommandName;

            Business.thetitle thetitle = new Business.thetitle();
            thetitle.Delete(Id);
            Repeater1.DataSource = thetitle.Get("");
            Repeater1.DataBind();
            thetitle = null;
        }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Business.thetitle thetitle = new Business.thetitle();
         Repeater1.DataSource = thetitle.Get("");
         Repeater1.DataBind();
         thetitle = null;
     }
 }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         username.Value = (string)Session["UserName"];
         userid.Value   = (string)Session["UserId"];
         Label2.Text    = Request.QueryString["hwtit"];
         Business.thetitle thetitle = new Business.thetitle();
         Repeater1.DataSource = thetitle.Get(string.Format(" and hwid ='{0}'", Request.QueryString["id"]));
         Repeater1.DataBind();
         thetitle = null;
     }
 }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["hwid"] != null)
                {
                    hwid.Text = Request.QueryString["hwid"];
                }
                if (Request.QueryString["id"] != null)
                {
                    Business.thetitle       thetitle     = new Business.thetitle();
                    Business.thetitleData[] thetitledata = thetitle.Select(Request.QueryString["id"]);

                    hwid.Text      = thetitledata[0].hwid;
                    thetitles.Text = thetitledata[0].thetitle;
                    memos.Text     = thetitledata[0].memos;


                    thetitle     = null;
                    thetitledata = null;
                }
            }
        }