如何显示客户记录 [英] How to display customer record

查看:74
本文介绍了如何显示客户记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我在网页设计中,我已经输入billno在网格视图中显示客户详细信息

Hi i m designing in my web page i have enter billno display customer details in grid view

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.IO;
namespace photoshops
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        SqlConnection conn = new SqlConnection();
        protected void Page_Load(object sender, EventArgs e)
        {
            conn.ConnectionString
              = @"Data Source=DEVI\SQLEXPRESS; Initial Catalog =cat; Integrated Security=SSPI";
            Load_GridData(); // call method below
        }
        void Load_GridData()
        {
            conn.Open(); // open the connection 
            SqlDataAdapter Sqa = new SqlDataAdapter("select * from tblphotosettings", conn);
            DataSet ds = new DataSet();
            Sqa.Fill(ds);  // fill the dataset 
            GridView1.DataSource = ds.Tables[0]; // give data to GridView
            conn.Close();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string strText = TextBox1.Text;
            SqlDataAdapter Sqa = new SqlDataAdapter("select * from tblphotosettings where BillNo= " + strText + "", conn);
        }
    }
}

如何更改我的代码im begineer

How to change in my code i m begineer

推荐答案

您将需要添加一个您的用户界面中的几个文本框.
完成此操作后,您将需要编写一个查询,该查询将根据ID提取Employee信息.

根据查询返回的值填充这些文本框.
You will need to add a few textboxes to your UI.
Once that is done, you will need to write a query that will fetch Employee information based on the Id.

Populate these textboxes based on the value returned from the query.


这篇关于如何显示客户记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆