本文整理汇总了C#中Helpers类的典型用法代码示例。如果您正苦于以下问题:C# Helpers类的具体用法?C# Helpers怎么用?C# Helpers使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Helpers类属于命名空间,在下文中一共展示了Helpers类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetOne
public static ModuloDTO GetOne(ModuloDTO oneModulo)
{
Helpers h = new Helpers();
var lModulos = GetAll();
oneModulo = lModulos.Single(x => x.Id_Modulo == oneModulo.Id_Modulo);
return oneModulo;
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:ModuloDTO.cs
示例2: ReceivedLogMessage
//called on GUI thread
private void ReceivedLogMessage(string message, Helpers.LogLevel level)
{
RichTextBox rtb = null;
switch (level)
{
case Helpers.LogLevel.Info:
rtb = rtbInfo;
break;
case Helpers.LogLevel.Warning:
rtb = rtbWarning;
break;
case Helpers.LogLevel.Error:
rtb = rtbError;
break;
case Helpers.LogLevel.Debug:
rtb = rtbDebug;
break;
}
rtb.AppendText("[" + DateTime.Now.ToString() + "] " + message + "\n");
}
开发者ID:SObS,项目名称:SLeek,代码行数:26,代码来源:DebugLog.cs
示例3: GetAll
public static List<ModuloDTO> GetAll()
{
string query = "select * from Tabla_Catalogo_Modulo where Estatus_Modulo = 1";
Helpers h = new Helpers();
var lModulos = h.GetAllParametized(query, new ModuloDTO());
return lModulos;
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:ModuloDTO.cs
示例4: client_OnLogMessage
//comes in on separate thread
private void client_OnLogMessage(string message, Helpers.LogLevel level)
{
if (this.IsHandleCreated)
BeginInvoke(new SecondLife.LogCallback(ReceivedLogMessage), new object[] { message, level });
else
initQueue.Add(new DebugLogMessage(message, level));
}
开发者ID:SObS,项目名称:SLeek,代码行数:8,代码来源:DebugLog.cs
示例5: Insert
public void Insert(Tabla_Registro_AgendaDTO oneAgenda)
{
string query =
"insert into Tabla_Registro_Agenda (Fecha_Agenda, Asunto_Agenda, Prioridad_Agenda, EstadoCitas_Agenda, Descripcion_Agenda, Inicio_Agenda, Fin_Agenda, Id_FichaIdentificacion, Id_Categoria, Estatus_Agenda) values(@Fecha_Agenda, @Asunto_Agenda, @Prioridad_Agenda, @EstadoCitas_Agenda, @Descripcion_Agenda, @Inicio_Agenda, @Fin_Agenda, @Id_FichaIdentificacion, @Id_Categoria, @Estatus_Agenda)";
Helpers h = new Helpers();
h.ExecuteNonQueryParam(query, oneAgenda);
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:Tabla_Registro_AgendaDTO.cs
示例6: GetLast
public static Tabla_Catalogo_FichaIdentificacionDTO GetLast()
{
Helpers h = new Helpers();
string query = "select * from Tabla_Catalogo_FichaIdentificacion";
var lFichas = h.GetAllParametized(query, new Tabla_Catalogo_FichaIdentificacionDTO());
return lFichas.Last();
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:Tabla_Catalogo_FichaIdentificacionDTO.cs
示例7: GetOneByName
public static ModuloDTO GetOneByName(ModuloDTO oneModulo)
{
Helpers h = new Helpers();
var lModulos = GetAll();
oneModulo = lModulos.Single(x => x.Nombre_Modulo == oneModulo.Nombre_Modulo && x.Programa_Modulo == oneModulo.Programa_Modulo);
return oneModulo;
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:ModuloDTO.cs
示例8: Update
public void Update(NotaClinicaDTO oneNota)
{
string query =
"update Tabla_Registro_Consulta set Subjetivo_Consulta = @Subjetivo_Consulta, Objetivo_Consulta = @Objetivo_Consulta, Analisis_Consulta = @Analisis_Consulta, Plan_Consulta = @Plan_Consulta where ID_Consulta = @Id_Consulta and Id_FichaIdentificacion = @Id_FichaIdentificacion";
Helpers h = new Helpers();
h.ExecuteNonQueryParam(query, oneNota);
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:NotaClinicaDTO.cs
示例9: GetLast
public static Tabla_Catalogo_ConceptoPagoDTO GetLast()
{
Helpers h = new Helpers();
string query = "select * from Tabla_Catalogo_ConceptoPago";
var lFichas = h.GetAllParametized(query, new Tabla_Catalogo_ConceptoPagoDTO());
return lFichas.Last();
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:Tabla_Catalogo_ConceptoPago.cs
示例10: Insert
public void Insert(ConsultaProcedimientoDTO oneConsulta)
{
string query =
"insert into Tabla_Registro_ConsultaProcedimiento(Id_Consulta, Id_Procedimiento, Id_FichaIdentificacion, Fecha_ConsultaProcedimiento, Observaciones_ConsultaProcedimiento, Estatus_ConsultaProcedimiento) values(@Id_Consulta, @Id_Procedimiento, @Id_FichaIdentificacion, @Fecha_ConsultaProcedimiento, @Observaciones_ConsultaProcedimiento, @Estatus_ConsultaProcedimiento)";
Helpers h = new Helpers();
h.ExecuteNonQueryParam(query, oneConsulta);
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:ConsultaProcedimientoDTO.cs
示例11: GetLast
public static PerfilDTO GetLast()
{
Helpers h = new Helpers();
var lPerfiles = GetAll();
var onePerfil = lPerfiles.Last();
return onePerfil;
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:PerfilDTO.cs
示例12: Delete
public void Delete(ConsultaProcedimientoDTO oneConsulta)
{
string query =
"delete Tabla_Registro_ConsultaProcedimiento where Id_ConsultaProcedimiento = @Id_ConsultaProcedimiento";
Helpers h = new Helpers();
h.ExecuteNonQueryParam(query, oneConsulta);
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:7,代码来源:ConsultaProcedimientoDTO.cs
示例13: GetProxy
public ServerProxy GetProxy(Helpers.EclipseWorkspace workspace)
{
if (workspace == null)
return null;
ServerProxy retVal = null;
lock (proxyList)
{
if (!proxyList.TryGetValue(workspace, out retVal))
{
Telemetry.Client.Get().TrackEvent("App.ServerLaunch");
retVal = new ServerProxy("javapkgsrv-" + Guid.NewGuid());
retVal.LIFORequests.Add(Protocol.Request.RequestType.ParamHelpPositionUpdate);
if (retVal.Start(workspace.Name))
{
proxyList.Add(workspace, retVal);
refCounts.Add(retVal, 1);
Telemetry_MaxInstances = Math.Max(proxyList.Count, Telemetry_MaxInstances);
}
else
return null;
}
else
++refCounts[retVal];
}
retVal.TerminatedAbnormally += ServerProxy_TerminatedAbnormally;
return retVal;
}
开发者ID:XewTurquish,项目名称:vsminecraft,代码行数:31,代码来源:ServerProxy.cs
示例14: GetNewRepository
protected virtual Repository.Logic.Repository GetNewRepository(Helpers.Log.SessionInfo logSession)
{
var rep = new Repository.Logic.Repository();
rep.SqlLog += (s, e) => RaiseSqlLog(e);
rep.Log += (s, e) => logSession.Add(e, "[REPOSITORY]");
return rep;
}
开发者ID:kblc,项目名称:Personnel.old,代码行数:7,代码来源:BaseService.cs
示例15: BTFileLoader
public BTFileLoader(Helpers mh)
{
m_Helpers = mh;
m_Helpers.m_Blob.CreateContainer("log");
//m_LogBlob.SetContainerACL("log", "private");
CloudBlobContainer container = m_Helpers.m_Blob.BlobClient.GetContainerReference("log");
/*
CloudBlobContainer blobContainer = blobClient.GetContainerReference("azurecontainer");
CloudBlob blob = Container.GetBlobReference(blobname + ".res");
BlobStream bs = blob.OpenWrite();
TextWriter tw = new StreamWriter(bs);
string append = resultsLine + ", ";
tw.WriteLine(append);
*/
CloudBlob blob = container.GetBlobReference("AudibleLoader.Log");
BlobStream bs = blob.OpenWrite();
TextWriter tw = new StreamWriter(bs);
tw.WriteLine("test");
tw.Flush();
//content = new UTF8Encoding().GetString(data);
bs.Close();
//BlobStream OpenWrite ()
}
开发者ID:colebank,项目名称:BloodHound,代码行数:25,代码来源:BTLoader.cs
示例16: GetInputRequestHeaders
/// <summary>
/// Get parameters from input request stream
/// </summary>
/// <param name="mime">File mime type</param>
/// <param name="encoding">File encoding</param>
/// <param name="fileName">File name</param>
private void GetInputRequestHeaders(out string mime, out Encoding encoding, out string fileName, Helpers.Log.SessionInfo upperLogSession)
{
if (upperLogSession == null)
throw new ArgumentNullException(nameof(upperLogSession));
mime = null;
encoding = null;
fileName = null;
using (var logSession = Helpers.Log.Session($"{GetType()}.{System.Reflection.MethodBase.GetCurrentMethod().Name}()", VerboseLog, ss => ss.ToList().ForEach(s => upperLogSession.Add(s))))
try
{
var webContext = System.ServiceModel.Web.WebOperationContext.Current;
if (webContext != null)
{
var ct = webContext.IncomingRequest.ContentType.Split(new char[] { ';' }, StringSplitOptions.None).Select(i => i.Trim());
mime = ct.FirstOrDefault();
var encName = ct.Skip(1).FirstOrDefault();
if (!string.IsNullOrWhiteSpace(encName))
try { encoding = Encoding.GetEncoding(encName); } catch { }
var cd = webContext.IncomingRequest.Headers.Get("Content-Disposition");
if (!string.IsNullOrWhiteSpace(cd))
{
var fName = cd.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).FirstOrDefault(i => i.ToLower().StartsWith("filename="));
fileName = fName.Substring(fName.IndexOf("=") + 1);
}
}
}
catch (Exception ex)
{
logSession.Add(ex);
logSession.Enabled = true;
upperLogSession.Enabled = true;
}
}
开发者ID:kblc,项目名称:Royalty,代码行数:41,代码来源:FileService.cs
示例17: ExecuteQuery
public DataSet ExecuteQuery(EDtxReaderType type, int timeout, string cmdText, Helpers.ParamHelper[] paramList, ref TimeSpan span)
{
DataSet retv = new DataSet();
try
{
//Technically you only need to register once, but as a showcase of what one would do, here is a quick example.
int retcode = Helpers.HelperFunctions.RegisterUser(keyFileTB.Text);
returnCodeTB.Text = retcode.ToString();
if(retcode == 0)
{
IDbConnection conn = QueryHelper.GetConnection(type, HelperFunctions.GetUniqueKey(10), HelperFunctions.GetUniqueKey(20), string.Empty, string.Empty);
if (conn != null)
{
retv = QueryHelper.ExecuteSelect(type, timeout, conn, cmdText, paramList, ref span);
}
else
{
MessageBox.Show("Unable to build connection object");
}
}
}
catch(Exception e)
{
MessageBox.Show("Execute Query Failed with an unknown error: " + e.Message + Environment.NewLine + e.StackTrace);
Console.WriteLine(e);
}
return retv;
}
开发者ID:cgabilla,项目名称:cKarp,代码行数:28,代码来源:G62PlusControl.cs
示例18: LlenarPaquete
public void LlenarPaquete()
{
// Isertar analisis en paquetes
string query = "select * from Tabla_Temporal_AnalisisClinico where Id_Consulta = @Id_Consulta and Id_FichaIdentificacion = @Id_FichaIdentificacion";
Helpers h = new Helpers();
var oneTemp = new Tabla_Temporal_AnalisisClinicoDTO();
oneTemp.Id_Consulta = Id_Consulta;
oneTemp.Id_FichaIdentificacion = Id_FichaIdentificacion;
var lTemporal = h.GetAllParametized(query, oneTemp);
string queryInsert = "insert into Tabla_Registro_AnalisisClinicoPaquetes (Id_AnalisisClinico, Id_AnalisisClinicoPaquetes) values (@Id_AnalisisClinico, @Id_AnalisisClinicoPaquetes)";
var oneT = new Tabla_Analsis_TemplateDTO();
string queryLast = "SELECT TOP 1 Id_AnalisisClinicoPaquetes FROM Tabla_Registro_AnalisisClinicoPaquetes ORDER BY Id_AnalisisClinicoPaquetes DESC";
var lIdTemplate = h.GetAllParametized(queryLast, oneT);
if (lIdTemplate.Count == 0)
{
oneT.Id_AnalisisClinicoPaquetes = 0;
}
else
{
oneT.Id_AnalisisClinicoPaquetes = lIdTemplate[0].Id_AnalisisClinicoPaquetes + 1;
}
foreach (var y in lTemporal)
{
var oneTemplate = new Tabla_Analsis_TemplateDTO();
oneTemplate.Id_AnalisisClinico = y.Id_AnalisisClinico;
oneTemplate.Id_AnalisisClinicoPaquetes = oneT.Id_AnalisisClinicoPaquetes;
h.ExecuteNonQueryParam(queryInsert, oneTemplate);
}
// string script = "AlertaGuardar();";
// ScriptManager.RegisterStartupScript(this, GetType(), "ServerControlScript", script, true);
Page.Response.Redirect(Page.Request.Url.ToString(), true);
return;
}
开发者ID:mine07,项目名称:MedicalManagement,代码行数:34,代码来源:AnalisisConsulta.aspx.cs
示例19: GetWeatherInfo
public async void GetWeatherInfo()
{
var helpers = new Helpers();
Coordinate positon = await helpers.GetCoordinates();
ForecastIOResponse info = null;
MessageDialog msg = null;
try
{
info = await DataPersister.GetInfo(positon.Lat, positon.Lon);
Currently rawData = info.Currently;
DateTime date = new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(rawData.Time);
rawData.FormatedTime = date.ToString("dd/MMM/yyyy hh:mm");
}
catch (Exception)
{
msg = new MessageDialog("Info loading failed!");
}
if (msg != null)
{
await msg.ShowAsync();
return;
}
this.AllInfo = info;
this.WeatherInfo = info.Currently;
}
开发者ID:HansS,项目名称:TelerikAcademy-homework,代码行数:28,代码来源:CurrentWeatherViewModel.cs
示例20: GetWeatherInfo
public async void GetWeatherInfo()
{
var helper = new Helpers();
Coordinate positon = await helper.GetCoordinates();
ForecastIOResponse info = null;
MessageDialog msg = null;
try
{
info = await DataPersister.GetInfo(positon.Lat, positon.Lon);
}
catch (Exception)
{
msg = new MessageDialog("Info loading failed!");
}
if (msg != null)
{
await msg.ShowAsync();
return;
}
this.allInfo = info;
List<HourForecast> rawData = info.Hourly.Data;
for (int i = 0; i < rawData.Count; i++)
{
rawData[i].IconPath = string.Format("/Assets/WeatherIcons/{0}.png", rawData[i].Icon);
DateTime date = new DateTime(1970,1,1,0,0,0).AddSeconds(rawData[i].Time);
rawData[i].FormatedDate = date;
}
this.HourWeatherInfo = rawData;
}
开发者ID:HansS,项目名称:TelerikAcademy-homework,代码行数:33,代码来源:HourWeatherViewModel.cs
注:本文中的Helpers类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论