コード例 #1
0
 //private void BindDBID()
 //{
 //    objNotes = new NotesClass();
 //    DataTable dt = objNotes.GetALLDBID();
 //    ddlDBID.DataSource = dt;
 //    ddlDBID.DataTextField = "DBID";
 //    ddlDBID.DataValueField = "DBID";
 //    ddlDBID.DataBind();
 //}
 private void GetHandle()
 {
     try
     {
         objNotes             = new NotesClass();
         objNotes.NotesHandle = Request.QueryString["handle"];
         DataTable dt = objNotes.GetALLHandleByID();
         if (dt.Rows.Count > 0)
         {
             txtNotesHandle.Text    = dt.Rows[0]["NotesHandle"].ToString();
             txtAcessIndex.Text     = dt.Rows[0]["AccessIndex"].ToString();
             txtTableName.Text      = dt.Rows[0]["TableName"].ToString();
             txtTableDesc.Text      = dt.Rows[0]["TableDescription"].ToString();
             txtRemarks.Text        = dt.Rows[0]["Remarks"].ToString();
             txtDBID.Text           = dt.Rows[0]["DBID"].ToString();
             btnSaveHandle.Text     = "Update";
             txtNotesHandle.Enabled = false;
             divHeader.InnerText    = "Update Notes Handle";
         }
         else
         {
             btnSaveHandle.Text = "Save";
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Due to some technical issue record not found');", true);
     }
 }
コード例 #2
0
        private void GetNotes()
        {
            try
            {
                objNotes             = new NotesClass();
                objNotes.NotesHandle = Request.QueryString["handle"];
                objNotes.IndexValue  = Request.QueryString["index"];
                DataTable dt = objNotes.GetNotesFromASPNETUSer();
                if (dt.Rows.Count > 0)
                {
                    if (Request.QueryString["Hd"] == null)
                    {
                        spIndex.InnerHtml = dt.Rows[0]["TableDescription"].ToString() + " , " + Request.QueryString["index"];
                    }
                    rptNotes.DataSource = dt;
                    rptNotes.DataBind();
                }
                else
                {
                    if (Request.QueryString["Hd"] == null)
                    {
                        objNotes             = new NotesClass();
                        objNotes.NotesHandle = Request.QueryString["handle"];
                        DataTable dtHandle = objNotes.GetALLHandleByID();
                        spIndex.InnerHtml = dtHandle.Rows[0]["TableDescription"].ToString() + " , " + Request.QueryString["Index"];
                    }

                    //ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('No record found');", true);
                }
            }
            catch (Exception ex)
            {
            }
        }