public string _WritePackageLine(GameObject activePackage, string FileContent) { helpers helpers = general_manager.manager.helper; if (activePackage.name == "gpcr") { FileContent = helpers.WriteLine("gpcr_orth", "true", FileContent); } else if (activePackage.name == "allosteric") { FileContent = helpers.WriteLine("allosteric", "true", FileContent); } else if (activePackage.name == "ppi") { FileContent = helpers.WriteLine("ppi", "true", FileContent); } else if (activePackage.name == "docking") { FileContent = helpers.WriteLine("induced_fit_fast", "true", FileContent); } else if (activePackage.name == "binding") { FileContent = helpers.WriteLine("out_in", "true", FileContent); } return(FileContent); }
private void loadEstadClientesPorLocalidades(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT c.nroCliente, l.nombre as nombre FROM clientesMayoristas c JOIN localidades l ON c.codPostal = l.codPostal;"; ayudante.cargarReporte(sql, "DataSet1", estadClientesPorLocalidades); }
private void reportViewer1_Load(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT v.idProducto , p.nombreProducto FROM detalleVentas v JOIN productos p ON v.idProducto = p.idProducto;"; ayudante.cargarReporte(sql, "DataSet1", reportViewer1); }
private void loadEstadGananciaApilada(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT * FROM estadisticaVentasApiladas ORDER BY mes;"; ayudante.cargarReporte(sql, "vistaVentaApilada", estadGananciaApilada); }
private void loadInformeListadoProd(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT idProducto, nombreProducto, descripcionProducto, cantidadStock, ('$' + CONVERT(VARCHAR, precioUnitario)) as precioUnitario, stockMinimo, idCategoria FROM productos;"; ayudante.cargarReporte(sql, "datosProductos", informeListadoProd); }
private void loadEstadProductosPorCategoria(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT p.idProducto, p.idCategoria, c.nombreCategoria as stockMinimo FROM productos p JOIN categoriasProductos c ON p.idCategoria = c.idCategoria;"; ayudante.cargarReporte(sql, "DataSet1", estadProductosPorCategoria); }
private void reportViewer1_Load(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT e.nombre , e.sigueTrabajando FROM empleados e;"; ayudante.cargarReporte(sql, "DataSet1", reportViewer1); }
private void estadCantidadVentasMensuales_Load(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT MONTH(ventas.fechaHora) as nroCliente, ventas.idFactura FROM ventas WHERE YEAR(ventas.fechaHora) = '" + DateTime.Now.Year.ToString() + "' ORDER BY MONTH(ventas.fechaHora);"; ayudante.cargarReporte(sql, "DataSet1", estadCantidadVentasMensuales); }
private void loadInformeDiarioGanan(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT idFactura, importeTotal, ROUND(importeTotal * 0.21, 2) as idEmpleado, ROUND(importeTotal * 0.79, 2) as tipoPago FROM ventas WHERE CONVERT(DATE, fechaHora) = '" + ayudante.insertarFechaConFormato(DateTime.Now.ToString("dd/MM/yyyy")) + "';"; ayudante.cargarReporte(sql, "DataSet1", informeDiarioGanan); }
private void LoadInformeClientesMay(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT c.nroCliente, c.nombre, c.apellido, c.calle, c.nroCalle, c.codPostal, t.nombreTipoDoc as tipoDocumento, c.nroDocumento, c.email, c.telefono FROM clientesMayoristas c JOIN tipoDocumento t ON c.tipoDocumento = t.idTipoDoc;"; ayudante.cargarReporte(sql, "DataSet1", informeClientesMay); }
private void loadInformeProdFaltantes(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT idProducto, nombreProducto, descripcionProducto, stockMinimo, cantidadStock, (stockMinimo - cantidadStock) AS idCategoria FROM productos WHERE (stockMinimo - cantidadStock) > 0;"; ayudante.cargarReporte(sql, "DataSet1", informeProdFaltantes); }
private void loadEstadTiposPagosAnuales(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT v.idFactura, t.nombreTipoPago as nroCliente FROM ventas v JOIN tiposPagos t ON v.tipoPago = t.idTipoPago WHERE YEAR(v.fechaHora) = '" + DateTime.Now.Year.ToString() + "';"; ayudante.cargarReporte(sql, "DataSet1", estadTiposPagosAnuales); }
private void LoadInformeEmplead(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT e.idEmpleado, e.usuario, e.nombre, e.apellido, CONVERT(DATE, e.fechaNacimiento) as fechaNacimiento, CONVERT(DATE, e.fechaIngreso) as fechaIngreso, 'SI' as sigueTrabajando, p.nombrePerfil as idPerfil from empleados e join perfil p ON e.idPerfil = p.idPerfil WHERE sigueTrabajando = 1 UNION SELECT e.idEmpleado, e.usuario, e.nombre, e.apellido, CONVERT(DATE, e.fechaNacimiento) as fechaNacimiento, CONVERT(DATE, e.fechaIngreso) as fechaIngreso, 'NO' as sigueTrabajando, p.nombrePerfil as idPerfil from empleados e join perfil p ON e.idPerfil = p.idPerfil WHERE sigueTrabajando = 0"; ayudante.cargarReporte(sql, "DataSet1", informeEmplead); }
private void loadEstadVentasPorLocalidades(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT v.idFactura, l.nombre AS nroCliente FROM ventas v JOIN clientesMayoristas c ON v.nroCliente = c.nroCliente JOIN localidades l ON l.codPostal = c.codPostal;"; ayudante.cargarReporte(sql, "DataSet1", estadVentasPorLocalidades); }
private void LoadInformeClientesMayMenor(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT TOP 25 c.nroCliente, c.nombre, c.apellido, COUNT(v.idFactura) AS nroCalle, SUM(v.importeTotal) AS codPostal FROM clientesMayoristas c JOIN ventas v ON v.nroCliente = c.nroCliente GROUP BY c.nroCliente, c.nombre, c.apellido ORDER BY SUM(v.importeTotal);"; ayudante.cargarReporte(sql, "DataSet1", informeClientesMayMenor); }
private void loadInformeProdMasVendidos(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT TOP 20 p.idProducto, p.nombreProducto, p.descripcionProducto, SUM(d.cantidad) AS stockMinimo FROM productos p JOIN detalleVentas d ON p.idProducto = d.idProducto GROUP BY p.idProducto, p.nombreProducto, p.descripcionProducto ORDER BY SUM(d.cantidad) DESC;"; ayudante.cargarReporte(sql, "fullDataSet", informeProdMasVendidos); }
private void consultar(object sender, EventArgs e) { if (empleados.Count == 0) { MessageBox.Show("Debes agregar empleados!"); return; } string listaEmpleados = ""; for (int i = 0; i < empleados.Count; i++) { if (i == empleados.Count - 1) { listaEmpleados += "'" + empleados[i] + "'"; } else { listaEmpleados += "'" + empleados[i] + "',"; } } helpers ayudante = new helpers(); string sql = @"SELECT e.idEmpleado, e.usuario FROM empleados e JOIN ventas v ON v.idEmpleado = e.idEmpleado WHERE e.nombre IN(" + listaEmpleados + ")"; if (txtMes.Text.Length == 0 && txtAnio.Text.Length == 0) { sql += " AND MONTH(v.fechaHora) = " + DateTime.Now.Month.ToString() + " AND YEAR(v.fechaHora) = " + DateTime.Now.Year.ToString() + ";"; } else if (txtMes.Text.Length > 0 && txtAnio.Text.Length == 0) { MessageBox.Show("Debes introducir un año"); return; } else if (txtMes.Text.Length == 0 && txtAnio.Text.Length > 0) { if (!ayudante.esAnioValido(Int32.Parse(txtAnio.Text))) { MessageBox.Show("El año o el mes son invalidos"); return; } sql += "AND YEAR(v.fechaHora) = " + txtAnio.Text + ";"; } else { if (!ayudante.esAnioValido(Int32.Parse(txtAnio.Text)) || !ayudante.esMesValido(Int32.Parse(txtMes.Text))) { MessageBox.Show("El año o el mes son invalidos"); return; } sql += " AND MONTH(v.fechaHora) = " + txtMes.Text + " AND YEAR(v.fechaHora) = " + txtAnio.Text + ";"; } ayudante.cargarReporte(sql, "DataSet1", estadVentasPorEmpleado); }
private void LoadInformeTotalVentasPorCat(object sender, EventArgs e) { helpers ayudante = new helpers(); string sql = @"SELECT c.nombreCategoria AS idDetalleVenta, SUM(d.cantidad) AS idFactura, COUNT(v.idFactura) AS idProducto, SUM(v.importeTotal) AS precioUnitario FROM categoriasProductos c JOIN productos p ON c.idCategoria = p.idCategoria JOIN detalleVentas d ON d.idProducto = p.idProducto JOIN ventas v ON v.idFactura = d.idFactura GROUP BY c.nombreCategoria;"; ayudante.cargarReporte(sql, "DataSet1", InformeTotalVentasPorCat); }
public void WhenIAmAbleToSaveTheDetails(string name, string lastname, int price, string deppaid) { int RowCount; helpers h = new helpers(); string checkindate = h.GeCheckIntDate(); string checkoutdate = h.GeCheckOutDate(); Page p = new Page(); RowCount = p.EnterText(driver, name, lastname, price, deppaid, checkindate, checkoutdate); p.ReadElements(driver, name, lastname, price, RowCount); }
private void consultar(object sender, EventArgs e) { helpers ayudante = new helpers(); if (!ayudante.esAnioValido(Int32.Parse(txtAnio.Text))) { MessageBox.Show("Ingrese un año valido!"); return; } string sql = @"SELECT MONTH(ventas.fechaHora) as nroCliente, ventas.idFactura FROM ventas WHERE YEAR(ventas.fechaHora) = '" + txtAnio.Text + "' ORDER BY MONTH(ventas.fechaHora);"; ayudante.cargarReporte(sql, "DataSet1", estadCantidadVentasMensuales); }
private void consultar(object sender, EventArgs e) { helpers ayudante = new helpers(); if (txtAnio.Text.Length == 0 || !ayudante.esAnioValido(Int32.Parse(txtAnio.Text))) { MessageBox.Show("El año es invalido!"); return; } string sql = @"SELECT * FROM estadisticaGananciaAnual WHERE anio = " + txtAnio.Text + " OR anio IS NULL;"; ayudante.cargarReporte(sql, "dsGananciaMensual", estadGananciasAnuales); }
private void consultar(object sender, EventArgs e) { helpers ayudante = new helpers(); if (!ayudante.esFechaValida(txtFecha.Text)) { MessageBox.Show("Fecha invalida!"); return; } string sql = @"SELECT idFactura, importeTotal, ROUND(importeTotal * 0.21, 2) as idEmpleado, ROUND(importeTotal * 0.79, 2) as tipoPago FROM ventas WHERE CONVERT(DATE, fechaHora) = '" + ayudante.insertarFechaConFormato(txtFecha.Text) + "';"; ayudante.cargarReporte(sql, "DataSet1", informeDiarioGanan); }
//initialization void Start() { helpers = GetComponent <helpers>(); socket = GetComponent <socket>(); text = GetComponent <text>(); anim = GetComponent <Animator>(); s_movement = GetComponent <movement>(); s_socket = GetComponent <socket>(); range.heartBPM[0] = mams.minHeartBPM; range.heartBPM[1] = mams.maxHeartBPM; range.bodyTemp[0] = mams.minBodyTemp; range.bodyTemp[1] = mams.maxBodyTemp; range.glucose[0] = mams.minGlucose; range.glucose[1] = mams.maxGlucose; }
private void consultar(object sender, EventArgs e) { helpers ayudante = new helpers(); if (txtAnio.Text.Length == 0 || !ayudante.esAnioValido(Int32.Parse(txtAnio.Text))) { MessageBox.Show("Ingrese un año valido!"); return; } string sql = @"SELECT v.idFactura, t.nombreTipoPago as nroCliente FROM ventas v JOIN tiposPagos t ON v.tipoPago = t.idTipoPago WHERE YEAR(v.fechaHora) = '" + txtAnio.Text + "'"; if (txtMes.Text.Length > 0 && ayudante.esMesValido(Int32.Parse(txtMes.Text))) { sql += " AND MONTH(v.fechaHora) = '" + txtMes.Text + "';"; } ayudante.cargarReporte(sql, "DataSet1", estadTiposPagosAnuales); }
public void WriteInput() { string input_yml = "input.yml"; helpers helpers = general_manager.manager.helper; string FileContent = ""; GameObject activePackage = helpers.SelectActivePackage(); string system = general_manager.manager.system; string resname = helpers.SelectText(activePackage, "resname_panel"); string chain = helpers.SelectText(activePackage, "chain_panel"); string initialPosition = helpers.SelectText(activePackage, "initial_panel"); string finalPosition = helpers.SelectText(activePackage, "final_panel"); FileContent = helpers.WriteLine("system", system, FileContent); FileContent = helpers.WriteLine("resname", resname, FileContent); FileContent = helpers.WriteLine("chain", chain, FileContent); FileContent = helpers.WriteLine("initial_position", initialPosition, FileContent); FileContent = helpers.WriteLine("final_position", finalPosition, FileContent); FileContent = _WritePackageLine(activePackage, FileContent); System.IO.File.WriteAllText(input_yml, FileContent); }
private void consultarVentasMensuales(object sender, EventArgs e) { helpers ayudante = new helpers(); if (!ayudante.esAnioValido(Int32.Parse(txtAnio.Text)) || !ayudante.esMesValido(Int32.Parse(txtMes.Text))) { MessageBox.Show("Año o mes invalido!"); return; } string sql = @"SELECT e.idEmpleado, e.nombre, e.apellido, SUM(d.cantidad) as usuario, (SELECT COUNT(*) FROM detalleVentas de JOIN ventas ve ON de.idFactura = ve.idFactura WHERE idDetalleVenta = 1 AND e.idEmpleado = ve.idEmpleado AND MONTH(ve.fechaHora) = '" + txtMes.Text + @"' AND YEAR(ve.fechaHora) = '" + txtAnio.Text + @"') as contrasenia, (SELECT SUM(ventas.importeTotal) FROM ventas WHERE ventas.idEmpleado = e.idEmpleado AND MONTH(ventas.fechaHora) = '" + txtMes.Text + @"' AND YEAR(ventas.fechaHora) = '" + txtAnio.Text + @"') AS sigueTrabajando FROM empleados e JOIN ventas v ON e.idEmpleado = v.idEmpleado JOIN detalleVentas d ON v.idFactura = d.idFactura WHERE MONTH(v.fechaHora) = '" + txtMes.Text + @"' AND YEAR(v.fechaHora) = '" + txtAnio.Text + @"' GROUP BY e.idEmpleado, e.nombre, e.apellido"; ayudante.cargarReporte(sql, "DataSet1", informeMensVentas); }
public void Create(helpers.Dock cDock, ushort nZ, bool bStopOnEmpty, bool bOpacity, ulong nDelay) { (new Logger()).WriteDebug3("shared:playlist:create:in [hc:" + GetHashCode() + "]"); this.bStopOnEmpty = bStopOnEmpty; if (null == OnCreate) throw new Exception("shared:playlist:create: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]"); (new Logger()).WriteDebug3("shared:playlist:create: before callback [hc:" + GetHashCode() + "]"); OnCreate(this, cDock, nZ, bStopOnEmpty, bOpacity, nDelay); (new Logger()).WriteDebug3("shared:playlist:create:return [hc:" + GetHashCode() + "]"); }
public BaseController() { _helpers = new helpers(); }
public Logger(helpers.Logger.Level eLevel) : base(eLevel, "gc") { }
public void Create(string sFilename, helpers.Dock cDock, ushort nZ, ulong nFrameStart, ulong nDuration, bool bOpacity, ulong nDelay) { if (null == OnCreate) throw new Exception("shared:video:create: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]"); OnCreate(this, sFilename, cDock, nZ, nFrameStart, nDuration, bOpacity, nDelay); }
static void AnimationCreate(shared.Animation cAnimationShared, string sFolder, ushort nLoopsQty, bool bKeepAlive, helpers.Dock cDock, ushort nZ, bool bOpacity, ulong nDelay, float nPixelAspectRatio) { (new Logger()).WriteDebug3("in [bKeepAlive:" + bKeepAlive + "]"); BTL.Play.Animation cAnimationBTL = new BTL.Play.Animation(sFolder, nLoopsQty, bKeepAlive); EffectCover cEffectCover = null; lock (_ahEffects) { EffectCreate(cAnimationShared); _ahEffects[cAnimationShared] = new EffectCover(cAnimationBTL); cEffectCover = _ahEffects[cAnimationShared]; } cEffectCover.sType = "Animation"; cEffectCover.sInfo = sFolder; cAnimationBTL.cDock = cDock; cAnimationBTL.nLayer = nZ; cAnimationBTL.bOpacity = bOpacity; cAnimationBTL.nDelay = nDelay; cAnimationBTL.nPixelAspectRatio = nPixelAspectRatio; }
static void VideoCreate(shared.Video cVideoShared, string sFilename, helpers.Dock cDock, ushort nZ, ulong nFrameStart, ulong nDuration, bool bOpacity, ulong nDelay) //TODO убрать dock - его инициализация уже дублируется в userspace { BTL.Play.Video cVideoBTL = new BTL.Play.Video(sFilename); EffectCover cEffectCover = null; lock (_ahEffects) { EffectCreate(cVideoShared); _ahEffects[cVideoShared] = new EffectCover(cVideoBTL); cEffectCover = _ahEffects[cVideoShared]; } cEffectCover.sType = "Video"; cEffectCover.sInfo = sFilename; cVideoBTL.cDock = cDock; cVideoBTL.nLayer = nZ; cVideoBTL.nFrameStart = nFrameStart; cVideoBTL.nDuration = nDuration; cVideoBTL.bOpacity = bOpacity; cVideoBTL.nDelay = nDelay; }
static void EffectVideo_OnAreaSet(shared.Effect cSender, helpers.Area stArea) { try { EffectCover cEffectCover = EffectCoverGet(cSender); if (null == cEffectCover) throw new Exception("effect:area:set: указанный объект не зарегистрирован на сервере [hc:" + cSender.GetHashCode() + "]"); if (helpers.Area.stEmpty != stArea) { BTL.Play.EffectVideo cEffectVideoBTL; if (cEffectCover.oEffect is BTL.Play.EffectVideoAudio) cEffectVideoBTL = (BTL.Play.EffectVideo)(BTL.Play.EffectVideoAudio)cEffectCover.oEffect; else cEffectVideoBTL = (BTL.Play.EffectVideo)cEffectCover.oEffect; cEffectVideoBTL.stArea = stArea; } } catch (Exception ex) { (new Logger()).WriteError(ex); } }
static void EffectVideo_OnDockSet(shared.Effect cSender, helpers.Dock cDock) { try { EffectCover cEffectCover = EffectCoverGet(cSender); if (null == cEffectCover) throw new Exception("effect:dock:set: указанный объект не зарегистрирован на сервере [hc:" + cSender.GetHashCode() + "]"); BTL.Play.EffectVideo cEffectVideoBTL; if (cEffectCover.oEffect is BTL.Play.EffectVideoAudio) cEffectVideoBTL = (BTL.Play.EffectVideo)(BTL.Play.EffectVideoAudio)cEffectCover.oEffect; else cEffectVideoBTL = (BTL.Play.EffectVideo)cEffectCover.oEffect; cEffectVideoBTL.cDock = cDock; } catch (Exception ex) { (new Logger()).WriteError(ex); } }
static void PlaylistCreate(shared.Playlist cPlaylistShared, helpers.Dock cDock, ushort nZ, bool bStopOnEmpty, bool bOpacity, ulong nDelay) { (new Logger()).WriteDebug3("in [hc:" + cPlaylistShared.GetHashCode() + "]"); EffectCreate(cPlaylistShared); try { BTL.Play.Playlist cPlaylist = new BTL.Play.Playlist(); EffectCover cEffectCover = null; lock (_ahEffects) { _ahEffects[cPlaylistShared] = new EffectCover(cPlaylist); cEffectCover = _ahEffects[cPlaylistShared]; } cEffectCover.sType = "Playlist"; cEffectCover.sInfo = "x=" + cDock.cOffset.nLeft + ", y=" + cDock.cOffset.nTop; cPlaylist.cDock = cDock; cPlaylist.nLayer = nZ; cPlaylist.bStopOnEmpty = bStopOnEmpty; cPlaylist.bOpacity = bOpacity; cPlaylist.nDelay = nDelay; cPlaylist.oTag = cPlaylistShared; //EMERGENCY это что за хрень???????? Tag не использовать нигде!!!! кроме пользовательского фронтенда!!!!! cPlaylist.OnPlaylistIsEmpty += new BTL.Play.Playlist.PlaylistIsEmpty(OnPlaylistIsEmpty); } catch (Exception ex) { (new Logger()).WriteError(ex); } (new Logger()).WriteDebug4("return [hc:" + cPlaylistShared.GetHashCode() + "]"); }
public void Create(string sFolder, ushort nLoopsQty, bool bKeepAlive, helpers.Dock cDock, ushort nZ, bool bOpacity, ulong nDelay, float nPixelAspectRatio) { if (null == OnCreate) throw new Exception("shared:animation:create: отсутствует привязка к серверу объектов [hc:" + GetHashCode() + "]"); try { OnCreate(this, sFolder, nLoopsQty, bKeepAlive, cDock, nZ, bOpacity, nDelay, nPixelAspectRatio); } catch (Exception ex) { (new Logger()).WriteError(ex); } }