Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request["DEV"] != null)
         {
             body1.Visible = false;
             string   conStr = BillBase.GetConnByDevKey(Request["DEV"]);
             DataBase db     = new DataBase(DataBaseConnectStringHelper.GetDataBaseType(conStr, ""), conStr);
             string   tbname = Request["TB"];
             if (db.DataTables.Contains(tbname))
             {
                 DataBaseTable           tb = db.DataTables[tbname];
                 DataBaseFieldCollection fc = tb.DataFields;
                 if (fc != null)
                 {
                     repCus.DataSource = fc;
                     repCus.DataBind();
                 }
             }
         }
         else
         {
         }
     }
 }
Ejemplo n.º 2
0
    private void Init1(string dev1)
    {
        string connectStr = BillBase.GetConnByDevKey(dev1);

        Title = Convert.ToString(dev1) + "数据源" + "管理" + connectStr;

        DataBase db = new DataBase(DataBaseConnectStringHelper.GetDataBaseType(connectStr, ""), connectStr);
        DataBaseTableCollection tbs = db.DataTables;

        if (tbs != null)
        {
            repCus.DataSource = tbs;
            repCus.DataBind();
        }
        if (txtDEV.Items.Count > 0)
        {
            txtDEV.SelectedValue = dev1;
        }
    }