当前位置: 首页>>代码示例>>C#>>正文


C# DBManager.GetDataTableFromSQL方法代码示例

本文整理汇总了C#中DBManager.GetDataTableFromSQL方法的典型用法代码示例。如果您正苦于以下问题:C# DBManager.GetDataTableFromSQL方法的具体用法?C# DBManager.GetDataTableFromSQL怎么用?C# DBManager.GetDataTableFromSQL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBManager的用法示例。


在下文中一共展示了DBManager.GetDataTableFromSQL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetAllDataListCategory

 static public DataTable   GetAllDataListCategory()
 {
     String SQL = "select Category, Category from Sch.DesignformDatalist group by category";
     DBManager db = new DBManager();
     return  db.GetDataTableFromSQL(SQL);
     
 }
开发者ID:traveler33,项目名称:Pelesys.Scheduling,代码行数:7,代码来源:DesignFormDataList.cs

示例2: GetMaxTabID

        static public Int32 GetMaxTabID()
        {
            DBManager oDB = new DBManager();
            DataTable oDS = oDB.GetDataTableFromSQL("Select Max(FormTabID)as MaxTabID From sch.DesignFormTab");
            if (oDS.Rows.Count > 0)
            {
                if (oDS.Rows[0]["MaxTabID"] != null && oDS.Rows[0]["MaxTabID"].ToString() != string.Empty )
                {
                    Int32 rCount = Convert.ToInt32(oDS.Rows[0]["MaxTabID"].ToString());
                    rCount = rCount + 1;
                    return rCount;
                }
               
            }

            return 0;
        }
开发者ID:traveler33,项目名称:Pelesys.Scheduling,代码行数:17,代码来源:ResourceType.cs

示例3: GetAllFieldsByTableName

        public static DataTable GetAllFieldsByTableName(String TableName)
        {
            String SQL = @" GetDBSchema  @Type ='GetAllFiledsByTableName' , 
                               @TableName='" + TableName + "'";
            DBManager db = new DBManager();
            DataTable oDS = db.GetDataTableFromSQL(SQL);
            return oDS;

        }
开发者ID:traveler33,项目名称:Pelesys.Scheduling,代码行数:9,代码来源:DesignFormField.cs

示例4: GetDataTableStructure

 public static DataTable GetDataTableStructure(string TableName, string IDName, Int64 IDValue)
 {
     String SQL = @" Select * from " + TableName + " where " + IDName + " = " + IDValue;
     DBManager db = new DBManager();
     DataTable oDS = db.GetDataTableFromSQL(SQL);
     return oDS;
 
 }
开发者ID:traveler33,项目名称:Pelesys.Scheduling,代码行数:8,代码来源:DesignFormField.cs

示例5: SetPanelControl


//.........这里部分代码省略.........
                    }
                    //oDDL.SkinID = "sDropDownList";
                    if (oItem.IsVisible == true)
                    {
                        if (oItem.IsEnabled == false)
                        {
                            oDDL.Enabled = false;
                        }

                        bool IsTop = int.TryParse(oItem.ControlTop.ToString(), out num);
                        if (IsTop == true)
                        {
                            cssStyle = ccsRelative + ccsTop + num.ToString() + ccsPX;

                            // oDDL.Attributes.Add(AppConstManager.cStyle, AppConstManager.ccsRelative);
                            // oDDL.Attributes.Add(AppConstManager.cStyle, num.ToString() + AppConstManager.ccsPX);
                        }
                        bool IsLeft = int.TryParse(oItem.ControlLeft.ToString(), out num);
                        if (IsLeft == true)
                        {
                            cssStyle = cssStyle + ccsLeft + num.ToString() + ccsPX;
                            //oDDL.Attributes.Add(AppConstManager.cStyle, AppConstManager.ccsLeft + num.ToString() + AppConstManager.ccsPX);
                        }

                        // oDDL.Attributes.Add(AppConstManager.cStyle, cssStyle);

                        //Get data source

                        if (oItem.QueryStatement != null)
                        {
                            if (oItem.QueryStatement != string.Empty)
                            {
                                DBManager oDB = new DBManager();
                                DataTable oDS = oDB.GetDataTableFromSQL(oItem.QueryStatement);

                                string DisplayValue = oDS.Columns[0].ColumnName;
                                string IDValue = oDS.Columns[1].ColumnName;
                                SetListToDropDownList(oDS, oDDL, DisplayValue, IDValue);
                                // oDDLManager.SetDatasetToDropDownList(oDS, oDDL, DisplayValue, IDValue, true);
                            }

                        }
                        else
                        {
                            if (oItem.DataListType != null && oItem.DataListType != string.Empty)
                            {

                                List<DesignFormDataList> oDDLList = DesignFormDataList.GetDataListByType(oItem.DataListType);

                                oDDL.DataSource = oDDLList;
                                oDDL.DataTextField = "DisplayField";
                                oDDL.DataValueField = "ValueField";
                                oDDL.DataBind();
                            }
                        }

                        //set label
                        if (oItem.IsReadOnly == true)
                        {
                            oDDL.Enabled = false;
                        }

                        SetControlLabel(oPanel, oItem, eFormID);

                        LiteralControl oLiteral = new LiteralControl();
                        oLiteral.Text = "<Div id=\"DIV" + oDDL.ID + "\" Style='" + cssStyle + "'>";
开发者ID:traveler33,项目名称:Class,代码行数:67,代码来源:FormDesign.cs


注:本文中的DBManager.GetDataTableFromSQL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。