Tabs.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:1k
- using System;
- using System.Data;
- using System.Data.SqlClient;
- using System.Configuration;
- namespace qminoa.DA
- {
- /// <summary>
- /// Class1 的摘要说明。
- /// </summary>
- public class Tabs
- {
- private SqlDataAdapter Command;
- public Tabs()
- {
- String strCon=ConfigurationSettings.AppSettings["ConnectionString"];
- Command = new SqlDataAdapter();
- Command.SelectCommand = new SqlCommand();
- Command.SelectCommand.Connection = new SqlConnection(strCon);
- }
- public DataTable GetTab(string tabid)
- {
- DataSet ds_Tabs = new DataSet();
-
- SqlCommand gettab = Command.SelectCommand;
- gettab.CommandText ="GetsysTab";
- gettab.CommandType = CommandType.StoredProcedure;
- SqlParameter para_tabid = new SqlParameter("@tabid",SqlDbType.VarChar,20);
- para_tabid.Value = tabid;
- gettab.Parameters.Add(para_tabid);
- Command.Fill(ds_Tabs,"thisTab");
- return ds_Tabs.Tables["thisTab"];
- }
- }
- }