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


C# InfoType.ToString方法代码示例

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


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

示例1: Show

        /// <summary>
        /// 提示框,针对easyUi
        /// </summary>
        /// <param name="page">当前页面指针,一般为this</param>
        /// <param name="script">输出脚本</param>
        /// <param name="script">提示类型</param>
        /// <param name="Fun">回调函数</param>
        public static void Show(System.Web.UI.Page page, string msg, InfoType it,string Fun)
        {
            page.ClientScript.RegisterStartupScript(page.GetType(), UnionID().ToString(), "<script language='javascript' defer>using('messager',function(){$.messager.alert('系统提示','" + msg.Replace("'", "\"").Replace("\n", "").Replace("\r", "") + "。','" + it.ToString() + "'," + Fun + ")});</script>");

        }
开发者ID:uwitec,项目名称:ds568,代码行数:12,代码来源:MessageBox.cs

示例2: GetDB

        //public static List<ContractorDL> GetContractorsByCategoryArea(string cateId, string areaId)
        //{
        //    List<ContractorDL> contractors = new List<ContractorDL>();
        //    SqlConnection conn = new SqlConnection(BWConfig.ConnectionString);
        //    SqlDataReader rdr = null;
        //    try
        //    {
        //        conn.Open();
        //        string strSQL = "SELECT metakey, metadesc, metatitle FROM ContractorCategoryArea WHERE ContractorCategoryAreaID = @ID";
        //        SqlCommand sqlCommand = new SqlCommand(strSQL, conn);
        //        //sqlCommand.Parameters.Add("ID", SqlDbType.Int).Value = contractorCategoryAreaID;
        //        rdr = sqlCommand.ExecuteReader();
        //        if (rdr.HasRows)
        //        {
        //            if (rdr.Read())
        //            {
        //                //string key = "";
        //                //if (!String.IsNullOrEmpty(rdr["metakey"].ToString().Trim()))
        //                //    key = rdr["metakey"].ToString().Trim();
        //                //string desc = "";
        //                //if (!String.IsNullOrEmpty(rdr["metadesc"].ToString().Trim()))
        //                //    desc = rdr["metadesc"].ToString().Trim();
        //                //string title = "";
        //                //if (!String.IsNullOrEmpty(rdr["metatitle"].ToString().Trim()))
        //                //    title = rdr["metatitle"].ToString().Trim();
        //                //metaData = new MetaDataDL(key, desc, title);
        //            }
        //        }
        //    }
        //    finally
        //    {
        //        if (rdr != null)
        //        {
        //            if (!rdr.IsClosed)
        //                rdr.Close();
        //            rdr.Dispose();
        //        }
        //        if (conn != null)
        //        {
        //            if (conn.State == ConnectionState.Open)
        //                conn.Close();
        //            conn.Dispose();
        //        }
        //    }
        //    return contractors;
        //}
        private static ContractorDL GetDB(InfoType infoType, int objectID)
        {
            ContractorDL tempContractor = null;
            string tableName = infoType.ToString();
            string columnName = InfoTypeDL.GetColumnName(infoType);

            SqlConnection conn = new SqlConnection(BWConfig.ConnectionString);
            SqlDataReader rdr = null;

            try
            {
                conn.Open();

                string strSQL = "SELECT * FROM Info I JOIN " + tableName + " C ON (I.infoID = C.InfoID)  WHERE " + columnName + " = @ID";

                SqlCommand sqlCommand = new SqlCommand(strSQL, conn);
                sqlCommand.Parameters.Add("ID", SqlDbType.Int).Value = objectID;

                rdr = sqlCommand.ExecuteReader();
                if (rdr.HasRows)
                {
                    while (rdr.Read())
                    {
                        string cName = rdr["displayName"].ToString();
                        int cID = Convert.ToInt32(rdr["infoID"]);
                        tempContractor = new ContractorDL(cName, cID);

                        tempContractor.reviewSummary = rdr["reviewSummary"].ToString();
                        tempContractor.urlName = rdr["urlName"].ToString();
                        tempContractor.email = rdr["email"].ToString();

                        if (!String.IsNullOrEmpty(rdr["phone"].ToString()))
                            tempContractor.phoneNumbers.Add(new PhoneDL(rdr["phone"].ToString(), PhoneType.regular));
                        if (!String.IsNullOrEmpty(rdr["organicPhone"].ToString()))
                            tempContractor.phoneNumbers.Add(new PhoneDL(rdr["organicPhone"].ToString(), PhoneType.organic));
                        if (!String.IsNullOrEmpty(rdr["ppcPhone"].ToString()))
                            tempContractor.phoneNumbers.Add(new PhoneDL(rdr["ppcPhone"].ToString(), PhoneType.ppc));
                        if (!String.IsNullOrEmpty(rdr["facebookPhone"].ToString()))
                            tempContractor.phoneNumbers.Add(new PhoneDL(rdr["facebookPhone"].ToString(), PhoneType.facebook));

                        if (rdr["workersCompensation"] != DBNull.Value)
                            tempContractor.workersCompensation = rdr["workersCompensation"].ToString()[0];

                        tempContractor.hasLiability = Convert.ToBoolean(rdr["hasliability"]);

                        tempContractor.shortDescription = rdr["shortdesc"].ToString();
                        tempContractor.bestPickText = rdr["bestPickText"].ToString();
                        tempContractor.servicesOffered = rdr["servicesOffered"].ToString();
                        tempContractor.servicesNotOffered = rdr["servicesNotOffered"].ToString();
                        tempContractor.specializations = rdr["specializations"].ToString();
                        tempContractor.minimumJob = rdr["minimumJob"].ToString();
                        tempContractor.warranty = rdr["warranty"].ToString();
                        tempContractor.licenseNumber = rdr["licenseNumber"].ToString();
                        tempContractor.awardsAndCertifications = rdr["awardscertifications"].ToString();
//.........这里部分代码省略.........
开发者ID:SStewart-Ebsco,项目名称:TFS-Merge,代码行数:101,代码来源:ContractorDL.cs


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