コード例 #1
0
 public void loadAsset(int id)
 {
     try
     {
         adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();
         admin.TitlesDataTable tbl = title.GetTitle(id);
         if (tbl.Rows.Count > 0)
         {
             txtDescription.Value = tbl[0].datDescription.ToString();
             this.editskip.Value = "2";
         }
     }
     catch (Exception ex) { }
     }
コード例 #2
0
 public void loadAsset(int id)
 {
     try
     {
         adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();
         admin.TitlesDataTable tbl = title.GetTitle(id);
         if (tbl.Rows.Count > 0)
         {
             txtDescription.Value = tbl[0].datDescription.ToString();
             this.editskip.Value  = "2";
         }
     }
     catch (Exception ex) { }
 }
コード例 #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();

        if (!(type == "update"))
        {
            title.InsertTitle(txtDescription.Value);
        }
        else if (type == "update")
        {
            title.UpdateTitle(txtDescription.Value,
                              id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tedit"));
    }
コード例 #4
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.TitlesTableAdapter title = new adminTableAdapters.TitlesTableAdapter();

        if (!(type == "update"))
        {
            title.InsertTitle(txtDescription.Value);
         
        }
        else if (type == "update")
        {
           title.UpdateTitle(txtDescription.Value,
                             id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tedit"));
    }