예제 #1
0
        /// <summary>
        /// 获取服务器时间
        /// </summary>
        /// <returns></returns>
        public static string getServerTime()
        {
            string sql = "select convert(varchar(50),getdate(),120)";

            try
            {
                return(YKDataClass.GetSingle(sql).ToString());
                //Service.Service service = new CS2008App.Service.Service();
                //service.Url = Properties.Settings.Default.CS2008App_Service_Service;
                //return service.Query(sql).Tables[0].Rows[0].ToString();
            }
            catch (Exception) { return(DateTime.Now.ToString()); }
        }
예제 #2
0
        public static string GetFactoryName()
        {
            string sqlstr = "SELECT top 1 ISNULL(fCnName,'') AS fCnName FROM B_FactoryName";

            return(YKDataClass.GetSingle(sqlstr).ToString());
        }