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


C# Int64.ToString方法代码示例

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


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

示例1: GetContactDetails

        public string GetContactDetails(Int64 QuoteFileID)
        {
            //Connect to the database and execute the proc
            //Connection to database
            string _connstring = "Server=bwd-cs-m607;Database=H_CONFIG;uid=cpcuser;pwd=cpcuser2";

            SqlConnection myConnection = new SqlConnection(_connstring);
            DataSet objDataSet = new DataSet();

            SqlCommand myCommand = new SqlCommand(" exec GetQuoteContacts " + QuoteFileID.ToString());
            myConnection.Open();

            SqlDataAdapter objDataAdapter = new SqlDataAdapter(" exec GetQuoteContacts " + QuoteFileID.ToString(), myConnection);
            objDataAdapter.Fill(objDataSet, "QuoteFileDetail");
            myConnection.Close();

            //Create the Multidimensional Array
            string[][] QuoteFileDetailArray = new string[objDataSet.Tables[0].Rows.Count][];
            int i = 0;

            foreach (DataRow rs in objDataSet.Tables[0].Rows)
            {
                QuoteFileDetailArray[i] = new string[] { rs["telephone"].ToString(), rs["CustomerName"].ToString(), rs["Address1"].ToString(), rs["City"].ToString() };
                i = i + 1;
            }
            //return the JSON data
            JavaScriptSerializer js = new JavaScriptSerializer();
            string strJSON = js.Serialize(QuoteFileDetailArray);
            myConnection.Close();

            return strJSON;
        }
开发者ID:barneymc,项目名称:WebServices-iPhone-I,代码行数:32,代码来源:Service1.asmx.cs

示例2: toUInt32inArg

        private static int toUInt32inArg(Int64 value, string funcName, int argnum)
        {
            if (value < 0)
                throw new CodeEE(funcName + "の第" + argnum.ToString() + "引数に負の値(" + value.ToString() + ")が指定されました");
            else if (value > Int32.MaxValue)
                throw new CodeEE(funcName + "の第" + argnum.ToString() + "引数の値(" + value.ToString() + ")が大きすぎます");

            return (int)value;
        }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:9,代码来源:Instraction.Child.cs

示例3: FormatPhoneNumber

 //-------------------------------------------------------------------------------------------
 public static string FormatPhoneNumber(Int64 number)
 {
     if (number.ToString().Length == 7)
             return String.Format("{0:###-####}", number);
        else if (number.ToString().Length == 10)
             return String.Format("{0:(###) ###-####}", number);
        else if (number.ToString().Length == 11)
             return String.Format("{0:# (###) ###-####}", number);
        return number.ToString();
 }
开发者ID:weavver,项目名称:data,代码行数:11,代码来源:Common.cs

示例4: Delete_Item

 /// <summary>
 /// Removes the data row and its corresponding List_Obj objects
 /// </summary>
 /// <param name="TmpKey">
 /// The key of the data row to be removed
 /// </param>
 public virtual void Delete_Item(Int64 TmpKey)
 {
     DataRow[] ArrDr = this.mDt_List.Select("TmpKey = " + TmpKey.ToString());
     if (ArrDr.Length > 0)
     {
         ArrDr[0].Delete();
         foreach (BaseListObject Lo in this.mBase_ListObject)
         {
             BaseListObject.Str_Obj Lo_Obj = Lo.pList_Obj.FirstOrDefault(Item => Item.Name == TmpKey.ToString());
             if (Lo_Obj.Obj != null) { Lo.pList_Obj.Remove(Lo_Obj); }
         }
     }
 }
开发者ID:kolinlocke,项目名称:DataObjects_Framework,代码行数:19,代码来源:Base_List.cs

示例5: Execute

        public static Task<Hashtable> Execute(string method, Hashtable parms,ref Int64 requestid )
        {
            string strParams="";
            IEnumerator enu = parms.Keys.GetEnumerator();
            while (enu.MoveNext())
            {
                string parm = enu.Current.ToString() + "=" + Convert.ToString(parms[enu.Current.ToString()]);
                strParams = strParams + parm + "&";
            }

            strParams = strParams + "requestid=" + requestid.ToString()+"&";

             var result = Task<Hashtable>.Factory.StartNew(() =>
            {
                Hashtable ReturnData = new Hashtable();
                try
                {
                    Encoding encoding = Encoding.UTF8;
                    string strurl = strBaseUrl + strExecutePage;

                    string strJason = PostHttpResponse.GetStream(PostHttpResponse.CreatePostHttpResponseJson(strurl, "", "method=" + method + "&"+strParams + "clienttype=mobile", 300*1000, "", encoding, "", ref m_CookieContainer, true), encoding);
                    ReturnData = (Hashtable)MiniUiAppCode.JSON.Decode(strJason);

                }
                catch (Exception ex)
                {

                    ReturnData.Clear();
                    ReturnData.Add("error", "-1");
                    ReturnData.Add("message", "client error:" + ex.Message.ToString());
                }
                return ReturnData;
            });
            return result;
        }
开发者ID:hantao2015,项目名称:FinisarWebDll,代码行数:35,代码来源:RealsunClientNet.cs

示例6: checkMobile

 public Int32 checkMobile(Int64 num,Int64 mobile)
 {
     trans = session.BeginTransaction();
     try
     {
         var hql = @"from CallRecord c
                     where c.FPhoneNumber=:number";
         IEnumerable<CallRecord> ie=session.CreateQuery(hql)
             .SetString("number", num.ToString())
             .List<CallRecord>();
         Int32 flag = 0;
         Int32 month=DateTime.Now.Month;
         foreach (CallRecord call in ie)
         {
             if (call.T_from.Month >= month - 2 && call.T_from.Month <= month)
             {
                 if (mobile == call.TPhoneNumber)
                 {
                     flag = 1;
                     break;
                 }
             }
         }
         return flag;
     }
     catch (Exception)
     {
         throw new Exception();
     }
 }
开发者ID:kutang,项目名称:mobile,代码行数:30,代码来源:CallRecordDao.cs

示例7: GetCustomerMac

        /// <summary>  
        /// 获取Mac地址信息  
        /// </summary>  
        /// <param name="IP"></param>  
        /// <returns></returns>  
        public static string GetCustomerMac(string IP)
        {
            Int32 ldest = inet_addr(IP); //目的地的ip
            Int32 lhost = inet_addr("");   //本地服务器的ip
            Int64 macinfo = new Int64();
            Int32 len = 6;
            int res = SendARP(ldest, 0, ref macinfo, ref len);
            string mac_src = macinfo.ToString("X");

            while (mac_src.Length < 12)
            {
                mac_src = mac_src.Insert(0, "0");
            }

            string mac_dest = "";

            for (int i = 0; i < 11; i++)
            {
                if (0 == (i % 2))
                {
                    if (i == 10)
                    {
                        mac_dest = mac_dest.Insert(0, mac_src.Substring(i, 2));
                    }
                    else
                    {
                        mac_dest = ":" + mac_dest.Insert(0, mac_src.Substring(i, 2));
                    }
                }
            }

            return mac_dest;
        }
开发者ID:jakiy520,项目名称:QHJsonDemo,代码行数:38,代码来源:IpHelper.cs

示例8: SetADReceived

 public void SetADReceived(Int64 count)
 {
     ADReceived.Dispatcher.Invoke(
         new UpdateTextCallback(UpdateADReceived),
         new object[] { count.ToString() }
     );
 }
开发者ID:philip-w-howard,项目名称:AgDroneBridge,代码行数:7,代码来源:MainWindow.xaml.cs

示例9: AddNode

        public static INode AddNode(this IGraph myIGraph, Int64 myInt64Id)
        {
            if (myIGraph == null)
                throw new ArgumentNullException("myIGraph must not be null!");

            return myIGraph.AddNode(myInt64Id.ToString());
        }
开发者ID:subbuballa,项目名称:Walkyr,代码行数:7,代码来源:IGraphExtensions.cs

示例10: Decode

        public static List<double> Decode(Int64 encodedIntervals)
        {
            string encoding = encodedIntervals.ToString("D19");
            Int16 indicator = Int16.Parse(encoding.Substring(0, 1));
            List<double> intervals = new List<double>();
            int encodingIndex = 3;

            //If indicator is 1, find the non-zero entry, and parse it as 100%. Parse all others as 0
            if (indicator == 1) {
                for (int i = 0; i < 8; i++) {
                    if (encoding.Substring(encodingIndex, 2).Equals("99")) {
                        intervals.Add(100);
                    } else if (encoding.Substring(encodingIndex, 2).Equals("00") || encoding.Substring(encodingIndex, 2).Equals("01")) {
                        intervals.Add(0);
                    } else {
                        throw new ArgumentException("Encoded intervals are not correctly formatted");
                    }

                    encodingIndex += 2;
                }

            //If indicator is neither 1 or 0, throw an error
            } else if (indicator != 0) {
                throw new ArgumentException("Indicator value must be 1 or 0");

            //Parse all entries normally otherwise
            } else {
                for (int i = 0; i < 8; i++) {
                    intervals.Add(Int16.Parse(encoding.Substring(encodingIndex, 2)));
                    encodingIndex += 2;
                }
            }

            return intervals;
        }
开发者ID:JohanGregersen,项目名称:sw9project,代码行数:35,代码来源:IntervalHelper.cs

示例11: init

        public void init(string dbname, string ngaydt, Int64 soducu, Int64 dunocuoiky, Boolean real)
        {
            string sqlStrVG, sqlStrVL;
            string sqlStrRG, sqlStrRL;
            CashDB = new db(dbname);
            lblDunocu.Text = soducu.ToString();
            lblSoducuoi.Text = dunocuoiky.ToString();
            lblNgay.Text = ngaydt;
            sqlStrVG = "SELECT [MaDT], [Sotien], [MaHD], [NoQH], [Datra], [Real], [Mota] FROM [DONGTIEN] ";
            sqlStrVG = sqlStrVG + "WHERE [Sotien] > 0 AND FORMAT([Ngaytra], 'dd/mm/yyyy') = '" + lblNgay.Text + "'";
            if (realdata)
                sqlStrVG = sqlStrVG + "AND [Real] = Yes";
            FillDG(sqlStrVG, dtGridGIn);

            sqlStrVL = "SELECT [MaDT], [Sotienlai], [MaHD], [NoQH], [Datra], [Real], [Mota], [Tienchiulai], ([Laisuat] / 100) AS LaiSuat FROM [Tienlai] ";
            sqlStrVL = sqlStrVL + "WHERE [Sotienlai] > 0 AND FORMAT([Ngaytra], 'dd/mm/yyyy') = '" + lblNgay.Text + "'";
            if (realdata)
                sqlStrVL = sqlStrVL + "AND [Real] = Yes";
            FillDG(sqlStrVL, dtGridLIn);

            sqlStrRG = "SELECT [MaDT], ABS([Sotien]) AS Tientra, [MaHD], [NoQH], [Datra], [Real], [Mota] FROM [DONGTIEN] ";
            sqlStrRG = sqlStrRG + "WHERE [Sotien] < 0 AND FORMAT([Ngaytra], 'dd/mm/yyyy') = '" + lblNgay.Text + "'";
            if (realdata)
                sqlStrRG = sqlStrRG + "AND [Real] = Yes";
            FillDG(sqlStrRG, dtGridGOut);

            sqlStrRL = "SELECT [MaDT], ABS([Sotienlai]) AS Tienlaitra, [MaHD], [NoQH], [Datra], [Real], [Mota], [Tienchiulai], ([Laisuat] / 100) AS LaiSuat FROM [Tienlai] ";
            sqlStrRL = sqlStrRL + "WHERE [Sotienlai] < 0 AND FORMAT([Ngaytra], 'dd/mm/yyyy') = '" + lblNgay.Text + "'";
            if (realdata)
                sqlStrRL = sqlStrVL + "AND [Real] = Yes";
            FillDG(sqlStrRL, dtGridLOut);
            this.Show();
        }
开发者ID:ViniciusConsultor,项目名称:quanlydongtien,代码行数:33,代码来源:Dongchitiet.cs

示例12: retornacodigoenome

 public void retornacodigoenome(Int64 codigo, String nome)
 {
     textBox1.Text = codigo.ToString();
     textBox2.Text = nome;
     retornaconsulta();
     Calcularconta();
 }
开发者ID:killers,项目名称:Locadora,代码行数:7,代码来源:Frm_Devolucao.cs

示例13: GetInternalUsername

        internal string GetInternalUsername(Int64 nodeID)
        {
            string sql = "SELECT ";
            sql += "    [User.Account].[User].InternalUserName ";
            sql += "FROM ";
            sql += "    [RDF.Stage].InternalNodeMap  ";
            sql += "    INNER JOIN [User.Account].[User] ON [RDF.Stage].InternalNodeMap.InternalID = [User.Account].[User].PersonID ";
            sql += "WHERE ";
            sql += "    ([RDF.Stage].InternalNodeMap.Class = 'http://xmlns.com/foaf/0.1/Person')  ";
            sql += "    AND ([RDF.Stage].InternalNodeMap.NodeID = " + nodeID.ToString() + ") ";

            DbCommand cmd = GetCommand();
            cmd.CommandText = sql;
            cmd.CommandType = CommandType.Text;

            System.Data.DataTable dt = FillTable(cmd);
            if (dt.Rows.Count > 0)
            {
                if (!dt.Rows[0].IsNull("InternalUserName"))
                {
                    return dt.Rows[0]["InternalUserName"].ToString();
                }
            }
            return string.Empty;
        }
开发者ID:TariqStuff,项目名称:ProfilesRNS,代码行数:25,代码来源:Person.cs

示例14: GetMac

        /// <summary>
        /// 通过IPAddress 获取Mac地址,只是用于同网段
        /// </summary>
        /// <param name="client"></param>
        /// <returns></returns>
        /// <exception cref="NetworkException">failed to get client mac</exception>
        public static MacAddress GetMac(this IPAddress client)
        {
            if (client == null)
                throw new ArgumentNullException("client");
            try
            {
                int ldest = inet_addr(client.ToString()); //目的地的ip

                var macinfo = new Int64();
                int len = 6;
                int res = SendARP(ldest, 0, ref macinfo, ref len);
                string macSrc = macinfo.ToString("X");
                string macDest = "";

                while (macSrc.Length < 12)
                {
                    macSrc = macSrc.Insert(0, "0");
                }
                for (int i = 0; i < 11; i++)
                {
                    if (0 == (i % 2))
                    {
                        macDest = i == 10
                                      ? macDest.Insert(0, macSrc.Substring(i, 2))
                                      : "-" + macDest.Insert(0, macSrc.Substring(i, 2));
                    }
                }
                return MacAddress.Parse(macDest);
            }
            catch (Exception ex)
            {
                throw new NetworkException(String.Format("Can't find mac from {0}", client), ex);
            }
        }
开发者ID:luqizheng,项目名称:Qi4Net,代码行数:40,代码来源:IpAddressExtender.cs

示例15: GetItem

        /// <summary>
        /// ��ȡָ����ŵķ���������
        /// </summary>
        /// <param name="ctid">Ҫ��ȡ�ķ���������ı��</param>
        /// <returns>�ñ���µķ���������</returns>
        public ServiceTypeInfo GetItem(Int64 stid)
        {
            ServiceTypeInfo sti = null;

            SqlParameter[] param = new SqlParameter[]
            {
                new SqlParameter("@strWhere"," where ST_ID ="+stid.ToString()),
                new SqlParameter("@strTableName","i_ServiceType"),
                new SqlParameter("@strOrder","")
            };

            using (SqlDataReader dr = XYECOM.Core.Data.SqlHelper.ExecuteReader(CommandType.StoredProcedure, "XYP_SelectByWhere", param))
            {
                if (dr.Read())
                    sti = new ServiceTypeInfo(
                        Convert.ToInt64(dr["ST_ID"]),
                        dr["ST_Name"].ToString(),
                        Convert.ToInt64(dr["ST_ParentID"]),
                        dr["ModuleName"].ToString(),
                        dr["FullId"].ToString(),
                        Core.MyConvert.GetInt32(dr["InfoCount"].ToString())
                        );
            }

            return sti;
        }
开发者ID:xyecom,项目名称:AMS,代码行数:31,代码来源:ServiceType.cs


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