本文整理汇总了C#中System.Int16.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Int16.ToString方法的具体用法?C# Int16.ToString怎么用?C# Int16.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Int16
的用法示例。
在下文中一共展示了Int16.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateMessageHistory
public string CreateMessageHistory(Conn ObjConn, SqlCommand ObjSqlCommmand, int MessageID, string InquiryID, int FromUserID, string ExecutiveIP, int ToUserID,int MessageSequence,
Int16 MessageRead)
{
return ObjConn.executescalarstringquery(ObjSqlCommmand, "INSERT INTO [MessageHistory]([MessageID],[ExecutiveIP],[CustomerID],[MessageSequence],[MessageRead])"
+ " VALUES (" + MessageID.ToString() + ",'" + InquiryID + "'," + FromUserID.ToString() + ",'" + ExecutiveIP + "'," + MessageSequence.ToString() + "','"
+ MessageRead.ToString() + ")" + " Select @@IDENTITY");
}
示例2: StimulusOutEvent
private double[] waveform; //Stim voltage
#endregion Fields
#region Constructors
/// <summary>
/// Electrical stimulation event to be interpreted by NeuroRighter's all channel stimulation board.
/// </summary>
/// <param name="channel">Channel to stimulate</param>
/// <param name="time"> Time sample that stimulation should be applied </param>
/// <param name="waveform"> Stimulation waveform. </param>
public StimulusOutEvent(int channel, ulong time, double[] waveform)
{
try
{
this.channel = (short)channel;
this.sampleIndex = time;
this.waveform = new double[waveform.Length];
for (int i = 0; i < waveform.Length; i++)
{
this.waveform[i] = waveform[i];
}
this.analogEncode = new double[2];
this.digitalEncode = new uint[3];
this.analogEncode[0] = Math.Ceiling((double)channel / 8.0);
this.analogEncode[1] = (double)((channel - 1) % 8) + 1.0;
this.digitalEncode[0] = Convert.ToUInt32(Math.Pow(2, (Properties.Settings.Default.StimPortBandwidth == 32 ? BLANKING_BIT_32bitPort : BLANKING_BIT_8bitPort)));
this.digitalEncode[1] = channel2MUX_noEN((double)channel);
this.digitalEncode[2] = channel2MUX((double)channel);
this.sampleDuration = (uint)waveform.Length;
if (DigitalEncode[1] == 0 || DigitalEncode[2] == 0)
throw new Exception("NR stimulation exception: you are attempting to stimulate on channel " + channel.ToString() + " which has resulted in an error. \n" +
"this could be caused by your Properties.Settings.Default.MUXChannels, which is set to " + Properties.Settings.Default.MUXChannels.ToString() + " and must be either 16 or 8"
);
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
示例3: MantenimientoEntrevista
public Int16 MantenimientoEntrevista(EnEntrevista objEntrevista, List<EnCuestionario> lstCuestionario, string strEstado,Int16 intControlador)
{
log4net.ILog logger = log4net.LogManager.GetLogger("File");
Int16 intRpta = 0;
try
{
using (TransactionScope tx = new TransactionScope())
{
Int64 intCodEntrevista;
intCodEntrevista = (new DaEntrevista()).MantenimientoEntrevista(objEntrevista, intControlador);
for (int i = 0; i < lstCuestionario.Count; i++)
{
EnCuestionario objEnCuestionario = new EnCuestionario();
objEnCuestionario.FQ_Balotario_ID = lstCuestionario[i].FQ_Balotario_ID;
objEnCuestionario.valor = lstCuestionario[i].valor;
objEnCuestionario.FQ_Entrevista_ID = intCodEntrevista;
NeCuestionario objNe = new NeCuestionario();
objNe.MantenimientoCuestionario(objEnCuestionario,intControlador);
objEnCuestionario = null;
}
NeSolicitud objNesolicitud = new NeSolicitud();
intRpta = objNesolicitud.ActualizarSolicitudEstado(objEntrevista.FQ_Solicitud_ID, strEstado);
tx.Complete();
}
}
catch (Exception ex)
{
logger.Error("Error " + ex.Message + "Metodo :MantenimientoEntrevista Controlador :" + intControlador.ToString() );
}
return intRpta;
}
示例4: NaplDenniBilanci
public void NaplDenniBilanci(Int16 soutez, String login, DateTime datum, OdbcConnection spojeni)
{
/*---naplni denni bilanci pro zelene dny. Do poctu tipu celkem se pocitajio vsechny tipy
* i ¨tipy za zatim neodahrane zapasy--*/
Tip spravne;
Tip tip;
Int16 vaha;
OdbcCommand selekt;
OdbcDataReader reader;
String strSelekt = "SELECT typ,spravne,vaha from tipy, program WHERE tipy.kolo=" +
" program.kolo AND tipy.radek=program.radek AND date_trunc('day',zelden)=? AND mlogin=?" +
" AND program.kolo=" + soutez.ToString();
selekt = new OdbcCommand(strSelekt, spojeni);
selekt.Parameters.Add(new OdbcParameter("@p_datum", OdbcType.DateTime));
selekt.Parameters["@p_datum"].Value = datum;
selekt.Parameters.Add(new OdbcParameter("@p_login", OdbcType.NChar));
selekt.Parameters["@p_login"].Value = login;
reader = selekt.ExecuteReader();
this.pocetTipuCelkem = 0;
this.pocetTipuSpravne = 0;
this.pocetTipuSpatne = 0;
this.pocetDvotipuSpravne = 0;
this.pocetJednotipuSpravne = 0;
this.pocetBoduCelkem = 0;
while (reader.Read())
{
tip = new Tip(reader["typ"].ToString());
spravne = new Tip(reader["spravne"].ToString());
vaha = Int16.Parse(reader["vaha"].ToString());
this.pocetTipuCelkem++;
if (spravne.vnitrniHodnota != "")
{
if (tip == spravne)
{
this.pocetBoduCelkem += vaha * tip.vnitrniVaha;
this.pocetTipuSpravne++;
if (tip.vnitrniHodnota == "3" || tip.vnitrniHodnota == "4")
{
this.pocetDvotipuSpravne++;
}
else
{
this.pocetJednotipuSpravne++;
}
}
else
{
this.pocetTipuSpatne++;
}
}
}
reader.Close();
return;
}
示例5: INFATITime
public INFATITime(Int16 Hour, Int16 Minute)
{
this.Hour = Hour;
this.Minute = Minute;
StringBuilder sb = new StringBuilder();
sb.Append(Hour.ToString("D2"));
sb.Append(Minute.ToString("D2"));
this.TimeId = Convert.ToInt32(sb.ToString());
}
示例6: AddHit
// Add a piece of data (hit) to this stats object.
public void AddHit(Int16 raw_damage, Int16 absorbed_damage)
{
Int16 effective_damage = (Int16)(raw_damage - absorbed_damage);
// TODO clean the format of the hits ArrayList up for cleaner calculations?
this.hits.Add(
raw_damage.ToString() + ',' +
absorbed_damage.ToString() + ',' +
effective_damage.ToString()
);
}
示例7: DoCountTest
private void DoCountTest(string text, Int16 resultCount)
{
StackFrame frame = new StackFrame(1);
var method = frame.GetMethod();
var TestName = method.Name;
SearchForText(ChromeDriver, text);
TestAssert(
TestName,
GetResultSummaryText(ChromeDriver).Contains(resultCount.ToString()));
}
示例8: MantenimientoInformacionPatrimonial
public Int64 MantenimientoInformacionPatrimonial(EnInformacionPatrimonial objEnInfPatrimonial, Int16 intControlador)
{
log4net.ILog logger = log4net.LogManager.GetLogger("File");
Int64 intCodInformacionPatrimonialNeg;
try
{ DaInformacionPatrimonial objInformacionPatrimonial = new DaInformacionPatrimonial();
intCodInformacionPatrimonialNeg = objInformacionPatrimonial.MantenimientoInformacionPatrimonial(objEnInfPatrimonial, intControlador);
}
catch (Exception ex)
{
intCodInformacionPatrimonialNeg = 0;
logger.Error("Error " + ex.Message + "Metodo :MantenimientoInformacionPatrimonial Flag :" + intControlador.ToString());
}
return intCodInformacionPatrimonialNeg;
}
示例9: append
public string append(Int16 m)
{
if (n.Length <= 9)
{
n += m.ToString();
}
if (n.Contains("Error"))
{ n = string.Empty;
n += m.ToString();
}
edittext.Text = n;
return n;
}
示例10: MantenimientoReferenciaLaboral
public Int64 MantenimientoReferenciaLaboral(EnReferenciaLaboral objEnRefLaboral, Int16 intControlador)
{
Int64 intCodReferenciaLaboral;
log4net.ILog logger = log4net.LogManager.GetLogger("File");
try
{
DaReferenciaLaboral objReferenciaLaboral = new DaReferenciaLaboral();
intCodReferenciaLaboral=objReferenciaLaboral.MantenimientoReferenciaLaboral(objEnRefLaboral,intControlador);
}
catch (Exception ex)
{
intCodReferenciaLaboral = 0;
logger.Error("Error " + ex.Message + "Metodo :MantenimientoReferenciaLaboral Flag :" + intControlador.ToString());
}
return intCodReferenciaLaboral;
}
示例11: MantenimientoCuestionario
public Int16 MantenimientoCuestionario(EnCuestionario objEnCuestionario, Int16 intControlador)
{
log4net.ILog logger = log4net.LogManager.GetLogger("File");
Int16 intCod=1;
try
{
DaCuestionario objDa = new DaCuestionario();
objDa.MantenimientoCuestionario(objEnCuestionario, intControlador);
}
catch (Exception ex)
{
intCod = 0;
logger.Error("Error " + ex.Message + "Metodo :MantenimientoCuestionario Controlador: " + intControlador.ToString());
}
return intCod;
}
示例12: MantenimientoReferenciaBancaria
public Int64 MantenimientoReferenciaBancaria(EnReferenciaBancaria objEnRefBancaria, Int16 intControlador)
{
log4net.ILog logger = log4net.LogManager.GetLogger("File");
Int64 intCodReferenciaBancaria;
try
{DaReferenciaBancaria objReferenciaBancaria = new DaReferenciaBancaria();
intCodReferenciaBancaria=objReferenciaBancaria.MantenimientoReferenciaBancaria(objEnRefBancaria,intControlador);
}
catch (Exception ex)
{
intCodReferenciaBancaria = 0;
logger.Error("Error " + ex.Message + "Metodo :MantenimientoReferenciaBancaria Flag :" + intControlador.ToString());
}
return intCodReferenciaBancaria;
}
示例13: OtherPlayer
public OtherPlayer(float x, float y, float z, Int32 identity, Int16 mo, float xro, float yro)
{
model = mo;
Console.WriteLine(mo);
position.X = x;
position.Y = y;
position.Z = z;
id = identity;
alive = true;
Console.WriteLine(mo.ToString());
if (model == Constants.HAMPUS)
{
mod = Globals.hampus;
clipPlayer = new ClipPlayer(Globals.hampusSkinningData, 60);
animationClip = Globals.hampusSkinningData.AnimationClips["Take 001"];
}
else if (model == Constants.RASMUS)
{
mod = Globals.rasmus;
clipPlayer = new ClipPlayer(Globals.rasmusSkinningData, 60);
animationClip = Globals.rasmusSkinningData.AnimationClips["Take 001"];
}
else if (model == Constants.VALTER)
{
mod = Globals.valter;
clipPlayer = new ClipPlayer(Globals.valterSkinningData, 60);
animationClip = Globals.valterSkinningData.AnimationClips["Take 001"];
}
else if (model == Constants.AXEL)
{
mod = Globals.axel;
clipPlayer = new ClipPlayer(Globals.axelSkinningData, 60);
animationClip = Globals.axelSkinningData.AnimationClips["Take 001"];
}
Globals.s += identity;
xr = xro;
yr = yro;
Globals.players[identity] = this;
//idle
clipPlayer.play(animationClip, 570, 600, true);
}
示例14: ListarBusqueda
public List<EnCandidato> ListarBusqueda(string strNumDocumento, string strnombre, Int16 intFlag)
{
log4net.ILog logger = log4net.LogManager.GetLogger("File");
SqlConnection cn = new SqlConnection(this.cadenaconexion);
SqlCommand cmd = new SqlCommand("sp_ListarBusqueda", cn);
List<EnCandidato> lstEnCandidato = new List<EnCandidato>();
cmd.Parameters.Add(new SqlParameter("@numeroDocumento", SqlDbType.VarChar)).Value = strNumDocumento;
cmd.Parameters.Add(new SqlParameter("@nombre", SqlDbType.VarChar)).Value = strnombre;
cmd.Parameters.Add(new SqlParameter("@flag", SqlDbType.Int)).Value = intFlag;
cmd.CommandType = CommandType.StoredProcedure;
try
{
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
lstEnCandidato.Add(new EnCandidato()
{
FQ_Candidato_ID = dr.GetInt32(dr.GetOrdinal("FQ_Candidato_ID")),
nombre = dr.GetString(dr.GetOrdinal("NOMBRE")),
numeroDocumento = dr.GetString(dr.GetOrdinal("numeroDocumento")),
tipoDocumento = dr.GetString(dr.GetOrdinal("tipoDocumento")),
});
}
dr.Close();
}
catch (Exception ex)
{
logger.Error("Error " + ex.Message + "Metodo :ListarBusqueda NumeroDocumento: " + strNumDocumento + " Nombre :" + strnombre + " Flag :" + intFlag.ToString());
}
finally
{
if (cn.State == ConnectionState.Open)
{
cn.Close();
}
cn.Dispose();
}
return lstEnCandidato;
}
示例15: FormatDate
public static string FormatDate(byte? day, byte? month, Int16 year)
{
if(day.HasValue && month.HasValue)
{
int mindex = month.Value - 1;
if (mindex >= 0 && mindex < 12)
{
return string.Format("{0}/{1}/{2}", day, months[mindex], year);
}
return string.Format("{0}/{1}/{2}", year, day, month);
}
if(month.HasValue)
{
int mindex = month.Value - 1;
if (mindex >= 0 && mindex < 12)
{
return months[mindex] + "/" + year;
}
}
return year.ToString();
}