/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { return new Value() { mapId = node.AtInteger( "mapId" ), name = node.AtText( "name" ), }; }
private void EventHandle_CLICK_V1001_01(xml x) { string text = "你好,\n推荐的活动我们会尽快发送给你"; string senCon = wechatHandle.SendPassive_text(x.FromUserName, x.ToUserName, text); _http.Response.Write(senCon); }
static void Main(string[] args) { var bgWorker = new BackgroundWorker(); bgWorker.WorkerReportsProgress = true; bgWorker.DoWork += (sender, e) => { lacie BackupDrive = new lacie(); BackupDrive.findLacie(); xml xmlFile = new xml(); xmlFile.ProcessXML(); size BackupSize = new size(); BackupSize.GetSize(xmlFile.Path); int SizeofBackup = (int)(((BackupSize.BackupSize) / 1024f) / 1024f) / 1024; Console.WriteLine("Drive Letter: " + BackupDrive.Drive); Console.WriteLine("Volume Name: " + BackupDrive.VolumeLabel); Console.WriteLine("Free Space: " + Convert.ToString(BackupDrive.AvailableSize) + "G"); Console.WriteLine("Size of Lacie: " + Convert.ToString(BackupDrive.TotalSize) + "G"); Console.WriteLine("Backup Size: " + Convert.ToString(SizeofBackup + "G")); Console.WriteLine("Backing up " + BackupSize.FileCount + " files found in " + BackupSize.FolderCount + " folders."); Console.ReadKey(true); }; bgWorker.RunWorkerCompleted += (sender, e) => Console.WriteLine("completed..."); bgWorker.ProgressChanged += (sender, e) => Console.WriteLine("progressing..."); bgWorker.RunWorkerAsync(); }
public static WxMsg Deserialize(string msg) { xml xml = Deserialize(msg, typeof(xml)) as xml; switch (xml.MsgType.ToLower()) { case "text": return(TextMsg.Deserialize(msg)); case "image": return(ImageMsg.Deserialize(msg)); case "voice": return(VoiceMsg.Deserialize(msg)); case "video": return(VideoMsg.Deserialize(msg)); case "shortvideo": return(VoiceMsg.Deserialize(msg)); case "location": return(LocationMsg.Deserialize(msg)); case "link": return(LinkMsg.Deserialize(msg)); case "event": return(WxEventMsg.Deserialize(msg)); default: break; } return(xml); }
private void EventHandle_CLICK_Q1001_05(xml x) { string text = B_W_TextMessage.GetMessage(); string senCon = wechatHandle.SendPassive_text(x.FromUserName, x.ToUserName, text); _http.Response.Write(senCon); }
public SelectView_Form(Form xParentForm, SQLTable xTbl, TableDockingFormXml xTableDockingFormXml, ViewXml CurrentViewXml, xml myXml,FormMode mode) { m_mode = mode; m_ParentForm = xParentForm; this.Owner = xParentForm; this.Icon = CodeTables.Properties.Resources.SelectViewIcon; m_xml = myXml; m_CurrentViewXml = CurrentViewXml; m_tbl = xTbl; m_TableDockingFormXml = xTableDockingFormXml; InitializeComponent(); if (m_mode == FormMode.SELECT) { this.Text = lngRPM.s_SelectViewForTable.s + m_tbl.lngTableName.s; chkBoxSetAsDefault.Visible = true; this.btn_Select.Text = lngRPM.s_Select.s; this.btn_Cancel.Text = lngRPM.s_Cancel.s; } else { this.Text = lngRPM.s_DeleteViewForTable.s + m_tbl.lngTableName.s; chkBoxSetAsDefault.Visible = false; this.btn_Select.Text = lngRPM.s_Delete.s; this.btn_Cancel.Text = lngRPM.s_Close.s; } this.chkBoxSetAsDefault.Text = lngRPM.s_SelectAsDefaultView.s; lnlViewName.Text = lngRPM.s_SelectedView.s; foreach (ViewXml xViewXml in m_TableDockingFormXml.m_ViewXml) { this.rdblist_Views.Items.Add(xViewXml); } }
static void Main(string[] args) { using (StreamWriter sw = new StreamWriter("TestResults.xml")) { sw.write(" <?xml version="1.0"?> <FullResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Passed>2</Passed> <Total>2</Total> <Tests> <Result> <Successful>true</Successful> <Message>Passed</Message> <MethodName>Test1</MethodName> </Result> <Result> <Successful>true</Successful> <Message>Passed</Message> <MethodName>Test2</MethodName> </Result> </Tests> </FullResult> "); } while(true){} }
/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { var ipType = key.Attribute( "ipType" ); return new Value() { ipType = ipType != null ? ipType.AtText() : "linear", value = node.AtFloat() }; }
/// <summary> /// 关注事件处理 /// </summary> /// <param name="x"></param> public void EventHandle_subscribe(xml x) { B_W_Fans _b_fan = new B_W_Fans(); CT_Wechat_Fan o = wechatHandle.GetFans(x.FromUserName); int i = _b_fan.AddFans(o); wechatHandle.SendCustom_text(x.FromUserName, "亲爱的用户,欢迎使用大E库微信"); }
/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { return new Value() { lt = node.AtFloats( "LT", ' ' ), rt = node.AtFloats( "RT", ' ' ), lb = node.AtFloats( "LB", ' ' ), rb = node.AtFloats( "RB", ' ' ), }; }
private xml GetXMLObject() { string postStr = GetPostString(_http); StringReader Reader = new StringReader(postStr); XmlSerializer serializer = new XmlSerializer(typeof(xml)); xml o = serializer.Deserialize(Reader) as xml; B_W_Online.AddOnline(o.FromUserName, wechatHandle.GetLocalTime(o.CreateTime), null); B_W_Exception.AddLog(postStr, o.FromUserName); return(o); }
public xml obterEstoqueProduto(string idProduto) { //Base dos produtos BaseDados bd = new BaseDados(); //Popular a Classe xml xml dadosXML = new xml(bd.ObterProduto(idProduto)); //Retornar o xml return(dadosXML); }
public void TextHandle(xml x) { try { WechatCommunicator _C = new WechatCommunicator(x, CommunicatorKey.Q1001_05); } catch (Exception e) { B_W_Exception.AddExcep(x.MsgType, "客服系统异样", e.Message); } }
/// <summary> /// Alguns estados nao tem o servico de consulta ao cadastro de contribuinte, por exemplo. /// Então, antes da aplicacao chamar um servico, ela pode consultar para saber ser um servico está disponivel para um estado /// </summary> public override void Execute() { int emp = Empresas.FindEmpresaByThread(); pedidoWSExiste odados = new pedidoWSExiste(); odados.cUF = Empresas.Configuracoes[emp].UnidadeFederativaCodigo; odados.tpEmis = Empresas.Configuracoes[emp].tpEmis; odados.tpAmb = Empresas.Configuracoes[emp].AmbienteCodigo; odados.servicos = ""; //Definir o serviço que será executado para a classe Servico = Servicos.WSExiste; try { int intValue; if (this.vXmlNfeDadosMsgEhXML) //danasa 12-9-2009 { #if modelo_xml <?xml version = "1.0" encoding = "utf-8"?> < dados > < cUF > 31 < / cUF > opcional ou se informada a UF por sigla, convertemos para UF->inteiro < tpAmb > 2 < / tpAmb > opcional < tpEmis > 1 < / tpEmis > opcional <servicos> NFeConsultaCadastro, NFeStatusServico, ...< / servicos > < / dados > #endif Functions.DeletarArquivo(Path.Combine(Empresas.Configuracoes[emp].PastaXmlRetorno, Path.GetFileName(NomeArquivoXML.Replace(Propriedade.Extensao(Propriedade.TipoEnvio.EnvWSExiste).EnvioXML, Propriedade.Extensao(Propriedade.TipoEnvio.EnvWSExiste).RetornoXML).Replace(".xml", ".err")))); XmlDocument doc = new XmlDocument(); doc.Load(NomeArquivoXML); foreach (XmlNode node in doc.GetElementsByTagName("dados")) { XmlElement elementConfig = (XmlElement)node; odados.tpEmis = Convert.ToInt32(Functions.LerTag(elementConfig, TpcnResources.tpEmis.ToString(), odados.tpEmis.ToString())); odados.tpAmb = Convert.ToInt32(Functions.LerTag(elementConfig, TpcnResources.tpAmb.ToString(), odados.tpAmb.ToString())); string temp = Functions.LerTag(elementConfig, TpcnResources.cUF.ToString(), odados.cUF.ToString()); if (int.TryParse(temp, out intValue)) { odados.cUF = intValue; } else { odados.cUF = Functions.UFParaCodigo(temp); } odados.servicos = Functions.LerTag(elementConfig, "servicos", false); } }
private void EventHandle_CLICK_V1001_02(xml x) { string Title = "宝马7系现金优惠18万 购车送大礼包"; //string Title = string.Empty; string Description = "宝马7系现金优惠18万 购车送大礼包:"; string PicUrl = WebConfig.GetAppSettingString("Wechat_Web_Default_Image_Url"); //string PicUrl = string.Empty; string url = WebConfig.GetAppSettingString("Wechat_Web_Url") + "upload/1410101043493425.html"; string senCon = wechatHandle.SendPassive_image_text(x.FromUserName, x.ToUserName, Title, Description, PicUrl, url); _http.Response.Write(senCon); CRMTree.BLL.BL_Wechat.SendCustom_News(x.FromUserName, 51); }
/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { var integer = node.ChildOrNull( "integer" ); var @string = node.ChildOrNull( "string" ); var rect = node.ChildOrNull( "rect" ); var point = node.ChildOrNull( "point" ); return new Value() { point = point != null ? point.AtFloats( ' ' ) : null, rect = rect != null ? rect.AtFloats( ' ' ) : null, integer = integer != null ? (int?) integer.AtInteger() : null, text = @string != null ? @string.AtText() : null, }; }
public Form() { InitializeComponent(); //Se redimenciona la ventana por cualquier tema de margenes Menu.Width = 158; pictureBox1.Width = 158; btnRestore.Visible = false; tab = new Tabs(this.tabControl1); //La clasa tab utlizara el tab control de este panel open = new Open(); xml = new xml(); picktore = new PictureBox(); picktore.Size = new Size(700, 700); picktore.SizeMode = PictureBoxSizeMode.Zoom; //Adapta la imagen a las dimensiones this.PanelContenedor.Controls.Add(picktore); picktore.Location = new Point(0, 650); }
public bool Parse(xml data, out ExitCodes exitCode) { try { // <output><movie> var group = data[G.Output]; var elements = group?.GetElementsByTagName(E.Movie); ParseOutputOptions(elements); // <build><option> group = data[G.Build]; elements = group?.GetElementsByTagName(E.Option); ParseBuildOptions(elements); // <classpaths><class> group = data[G.Classpaths]; elements = group?.GetElementsByTagName(E.Class); ParseClasspaths(elements); // <includeLibraries><element> group = data[G.IncludeLibraries]; elements = group?.GetElementsByTagName(E.Element); ParseIncludeLibraries(elements); // <libraryPaths><element> group = data[G.LibraryPaths]; elements = group?.GetElementsByTagName(E.Element); ParseLibraryPaths(elements); // <externalLibraryPaths><element> group = data[G.ExternalLibraryPaths]; elements = group?.GetElementsByTagName(E.Element); ParseExternalLibraryPaths(elements); // <externalLibraryPaths><element> group = data[G.RslPaths]; elements = group?.GetElementsByTagName(E.Element); ParseRslPaths(elements); exitCode = 0; return(false); } catch (FormatException e) { return(ErrorHelper.ErrorParsingProjectFile(out exitCode, e)); } }
public new static WxEventMsg Deserialize(string msg) { xml xml = Deserialize(msg, typeof(xml)) as xml; switch (xml.Event.ToLower()) { case "location": return(LocationEventMsg.Deserialize(msg)); case "click": return(ClickEventMsg.Deserialize(msg)); case "view": return(ViewEventMsg.Deserialize(msg)); case "scancode_push": return(ScancodePushEventMsg.Deserialize(msg)); case "scancode_waitmsg": return(ScancodeWaitmsgEventMsg.Deserialize(msg)); case "pic_sysphoto": return(PicEventMsg.Deserialize(msg)); case "pic_photo_or_album": return(PicEventMsg.Deserialize(msg)); case "pic_weixin": return(PicEventMsg.Deserialize(msg)); case "location_select": return(LocationSelectEventMsg.Deserialize(msg)); case "batch_job_result": return(BatchJobResultEventMsg.Deserialize(msg)); case "subscribe": return(SubscribeEventMsg.Deserialize(msg)); case "unsubscribe": return(UnSubscribeEventMsg.Deserialize(msg)); case "enter_agent": return(EnterEventMsg.Deserialize(msg)); case "scan": return(ScanEventMsg.Deserialize(msg)); case "media_id": return(EnterEventMsg.Deserialize(msg)); case "view_limited": return(EnterEventMsg.Deserialize(msg)); case "MASSSENDJOBFINISH": return(MasssEndjobFinishEventMsg.Deserialize(msg)); case "TEMPLATESENDJOBFINISH": return(TemplateSendJobfinishEventMsg.Deserialize(msg)); default: break; } return(xml); }
// note: it's possible to create a valid formatter, and have an error. Like, when the syntax is partially right // In that case, I will just use what is valid private static column_formatter_base create_formatter(string name, string syntax, ref string error) { error = ""; column_formatter_base result = null; switch (name) { case "cell": result = new cell(); break; case "format": result = new column_formatters.format(); break; case "picture": result = new picture(); break; case "stack_trace": case "stack-trace": result = new stack_trace(); break; case "xml": result = new xml(); break; default: error = "Invalid formatter name: " + name; break; } // load_syntax if (result != null) { try { result.load_syntax(new settings_as_string(syntax), ref error); } catch (Exception e) { logger.Error("can't load formatter " + e.Message); error = "Cannot load " + name + ". Invalid syntax"; } } return(result); }
static void Main(string[] args) { string message = "<OrderRequest>" + "<Customer>" + "<CustomerID>4242</CustomerID>" + "</Customer>" + "<Product>" + "<ProductID>123</ProductID>" + "<Quantity>5</Quantity>" + "<Price>40.99</Price>" + "</Product>" + "<CreditCard>" + "<Holder>Klaus Aschenbrenner</Holder>" + "<Number>1234-1234-1234-1234</Number>" + "<ValidThrough>2009-10</ValidThrough>" + "</CreditCard>" + "<Shipping>" + "<Name>Klaus Aschenbrenner</Name>" + "<Address>Wagramer Strasse 4/803</Address>" + "<ZipCode>1220</ZipCode>" + "<City>Vienna</City>" + "<Country>Austria</Country>" + "</Shipping>" + "</OrderRequest>"; ClientApplication.vista_notebook.WebServiceEndpoint svc = new WebServiceEndpoint(); XmlDocument doc = new XmlDocument(); doc.LoadXml(message); xml requestMessage = new xml(); requestMessage.Any = new XmlNode[1] { doc.DocumentElement.ParentNode }; svc.UseDefaultCredentials = true; svc.SendOrderRequestMessage(requestMessage); Console.WriteLine("Done"); Console.ReadLine(); }
protected void BtnEditarDoc_Click(object sender, EventArgs e) { try{ xml vDatos = new xml(); Object[] vDatosMaestro = new object[20]; vDatosMaestro[0] = Session["DOCUMENTOS_ARCHIVO_ID"].ToString(); vDatosMaestro[1] = ""; vDatosMaestro[2] = TxNombre.Text; vDatosMaestro[3] = ""; vDatosMaestro[4] = ""; vDatosMaestro[5] = ""; vDatosMaestro[6] = ""; vDatosMaestro[7] = DDLConfirmacion.SelectedValue; vDatosMaestro[8] = ""; vDatosMaestro[9] = TxFecha.Text != "" ? Convert.ToDateTime(TxFecha.Text).ToString("yyyy-MM-dd HH:mm:ss") : "1900-01-01 00:00:00"; vDatosMaestro[10] = DDLRecordatorios.SelectedValue; vDatosMaestro[11] = DDLEstado.SelectedValue; vDatosMaestro[12] = Session["USUARIO"].ToString(); vDatosMaestro[13] = CBxConfidencial.Checked; vDatosMaestro[14] = DDLNivelConfidencialidad.SelectedValue; vDatosMaestro[15] = ""; vDatosMaestro[16] = ""; vDatosMaestro[17] = ""; vDatosMaestro[18] = ""; vDatosMaestro[19] = ""; String vXML = vDatos.ObtenerXMLDocumentos(vDatosMaestro); vXML = vXML.Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", ""); String vQuery = "[RSP_Documentacion] 26,0,'" + vXML + "'"; int vInfo = vConexion.ejecutarSql(vQuery); if (vInfo > 0) { Mensaje("Documento actualizado con éxito.", WarningType.Success); } ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "closeModal();", true); cargarDatos(Session["DOCUMENTOS_TIPO_ID"].ToString()); }catch (Exception ex) { Mensaje(ex.Message, WarningType.Danger); } }
public override void Execute() { Servico = Servicos.DANFERelatorio; int emp = Empresas.FindEmpresaByThread(); DateTime datai = DateTime.MinValue, dataf = DateTime.MaxValue; bool imprimir = false; string exportarPasta = "Enviados"; string fm = ""; try { if (this.vXmlNfeDadosMsgEhXML) { #if modelo_xml <?xml version = "1.0" encoding = "utf-8"?> < dados > < DataInicial > 2014 - 1 - 1 < / DataInicial > < DataFinal > 2014 - 12 - 1 < / DataFinal > < Imprimir > true </ Imprimir> < ExportarPasta > Enviar | Enviados | Erros </ ExportarPasta> < / dados > #endif Functions.DeletarArquivo(Path.Combine(Empresas.Configuracoes[emp].PastaXmlRetorno, Path.GetFileName(NomeArquivoXML.Replace(Propriedade.Extensao(Propriedade.TipoEnvio.EnvDanfeReport).EnvioXML, Propriedade.Extensao(Propriedade.TipoEnvio.EnvDanfeReport).RetornoXML).Replace(".xml", ".err")))); XmlDocument doc = new XmlDocument(); doc.Load(NomeArquivoXML); foreach (XmlNode node in doc.GetElementsByTagName("dados")) { XmlElement elementConfig = (XmlElement)node; exportarPasta = Functions.LerTag(elementConfig, "ExportarPasta", "Enviados"); datai = Convert.ToDateTime(Functions.LerTag(elementConfig, "DataInicial", "2001-1-1")); dataf = Convert.ToDateTime(Functions.LerTag(elementConfig, "DataFinal", "2999-1-1")); imprimir = Convert.ToBoolean(Functions.LerTag(elementConfig, "Imprimir", "true")); } fm = Functions.ExtrairNomeArq(NomeArquivoXML, Propriedade.Extensao(Propriedade.TipoEnvio.EnvDanfeReport).EnvioXML) + Propriedade.Extensao(Propriedade.TipoEnvio.EnvDanfeReport).RetornoXML; }
/// <summary> /// 菜单点击事件 /// </summary> /// <param name="x"></param> public void EventHandle_CLICK(xml x) { try { if (x.EventKey == "V1001_01") { EventHandle_CLICK_V1001_01(x); } else if (x.EventKey == "V1001_02") { EventHandle_CLICK_V1001_02(x); } else if (x.EventKey == "Q1001_05") { EventHandle_CLICK_Q1001_05(x); } } catch (Exception e) { B_W_Exception.AddExcep(x.MsgType, x.Event, e.Message); } }
/// <summary> /// 事件处理 /// </summary> /// <param name="x"></param> public void EventHandle(xml x) { try { if (x.Event.ToLower().Trim() == "subscribe") { EventHandle_subscribe(x); } else if (x.Event.ToLower().Trim() == "unsubscribe") { EventHandle_unSubscribe(x); } else if (x.Event.ToLower().Trim() == "click") { EventHandle_CLICK(x); } } catch (Exception e) { B_W_Exception.AddExcep(x.MsgType, x.Event, e.Message); } }
public xml ObterProdutoPorMarca(string marca_produto) { List <Produto> produtos = DAL.Produto.Instance.ListarProdutos(); //Filtrando apenas produtos da marca escolhida var result = from f in produtos select f; if (marca_produto != "todas") { result = from f in produtos where f.marca_func.Equals(marca_produto) select f; } //Popular a Classe xml xml dadosXML = new xml(result.ToList()); //Retornar o xml return(dadosXML); }
public void EventNavigation() { xml x = GetXMLObject(); switch (x.MsgType) { case "event": EventHandle(x); break; case "text": TextHandle(x); break; //case "location": // LocationMsg(rootElement); // break; //case "image": // ImageMsg(rootElement); // break; //case "link": // LinkMsg(rootElement); // break; //case "news": // NewsMsg(rootElement); // break; //case "MusicMsg": // NewsMsg(rootElement); // break; //case "voice": // VoiceMsg(rootElement); // break; //default: // WelCome(rootElement); // break; } }
/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { return new Value() { on = node.AtBoolean(), }; }
public static BatchJobResultEventMsg Deserialize(string msg) { xml xml = Deserialize(msg, typeof(xml)) as xml; return(xml); }
/// <summary> /// キーフレーム生成 /// </summary> /// <param name="key"></param> /// <param name="node"></param> /// <returns></returns> protected override SpriteAttribute.ValueBase CraeteValue( xml.NodeReader key, xml.NodeReader node ) { throw new System.NotImplementedException(); }
protected void BtnEnviar_Click(object sender, EventArgs e) { try{ validarDatos(); String vTipo = DDLTipoConstancia.SelectedValue; String vQuery = ""; DataTable vDatos = new DataTable(); String vCat = DDLCategoria.SelectedValue == "0" ? "null" : DDLCategoria.SelectedValue; String vDest = DDLDestinoCL.SelectedValue == "" ? "null" : DDLDestinoCL.SelectedValue; int vInfo = 0; vQuery = "[RSP_Constancias] 2" + "," + Session["USUARIO"].ToString() + "," + vTipo + "," + vCat + "," + vDest; vDatos = vConexion.obtenerDataTable(vQuery); if (vTipo == "2") { if (vDatos.Rows.Count > 0) { String vIdSolicitud = vDatos.Rows[0][0].ToString(); // xml xml vMaestro = new xml(); Object[] vDatosMaestro = new object[8]; vDatosMaestro[0] = TxDest1.Text; vDatosMaestro[1] = TxMont1.Text; vDatosMaestro[2] = TxDest2.Text; vDatosMaestro[3] = TxMont2.Text; vDatosMaestro[4] = TxDest3.Text; vDatosMaestro[5] = TxMont3.Text; vDatosMaestro[6] = TxDest4.Text; vDatosMaestro[7] = TxMont4.Text; String vXML = vMaestro.ObtenerMaestroString(vDatosMaestro); vXML = vXML.Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", ""); vQuery = "[RSP_Constancias] 3" + "," + vIdSolicitud + ",'" + TxMonto.Text + "'" + ",'" + TxPlazo.Text + "'" + ",'" + vXML + "'"; vInfo = vConexion.ejecutarSql(vQuery); if (vInfo == 1) { Mensaje("Solicitud creada con éxito.", WarningType.Success); } else { Mensaje("Solicitud no completada, favor comuníquese con sistemas.", WarningType.Success); } limpiarFormulario(); } } else { if (vDatos.Rows.Count > 0) { Boolean vDA = true; String vIdSolicitud = vDatos.Rows[0][0].ToString(); if (vDest == "6") { vQuery = "[RSP_Constancias] 4" + "," + vIdSolicitud + ",'" + TxAval.Text + "'" + ",'" + DDLParentezco.SelectedItem + "'"; vInfo = vConexion.ejecutarSql(vQuery); } else if (vDest == "11") { vQuery = "[RSP_Constancias] 5" + "," + vIdSolicitud + ",'" + TxEmbajada.Text + "'" + ",'" + TxFechaCita.Text + "'"; vInfo = vConexion.ejecutarSql(vQuery); } else if (vDest == "12") { vQuery = "[RSP_Constancias] 6" + "," + vIdSolicitud + ",'" + DDLFirmante.SelectedValue + "'" + ",'" + TxFecha.Text + "'" + ",'" + TxPasaporte.Text + "'" + ",'" + TxRTN.Text + "'" + ",'" + TxDomicilio1.Text + "'" + ",'" + TxDomicilio2.Text + "'" + ",'" + TxContacto.Text + "'" + ",'" + TxLugar.Text + "'" + ",'" + TxTelefono.Text + "'" + ",'" + TxEvento.Text + "'" + ",'" + TxFechaInicio.Text + "'" + ",'" + TxFechaFin.Text + "'" + ",'" + TxConsulado.Text + "'" + ",'" + TxDirConsul.Text + "'" + ",'" + TxPais.Text + "'" + ",'" + TxCiudad.Text + "'"; vInfo = vConexion.ejecutarSql(vQuery); } else { vDA = false; } if (vDA) { if (vInfo == 1) { MensajeLoad("Constancia solicitada con éxito.", WarningType.Success); } else { MensajeLoad("Solicitud no completada, favor comuníquese con sistemas.", WarningType.Success); } } else { MensajeLoad("Constancia solicitada con éxito.", WarningType.Success); } } else { MensajeLoad("Solicitud no completada, favor comuníquese con sistemas.", WarningType.Warning); } limpiarFormulario(); } cargarDatos(); UPBuzonGeneral.Update(); UpdatePanel1.Update(); }catch (Exception ex) { MensajeLoad(ex.Message, WarningType.Danger); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { <?xml version="1.0" encoding="utf-8" ?> <searchresults total_results="0"> </searchresults>�Aj:��:d���:https://services.addons.mozilla.org/fr/firefox/api/1.5/search/guid:%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D?src=firefox&appOS=WINNT&appVersion=32.0.3&tMain=60095&tFirstPaint=69234&tSessionRestored=73618security-infoFnhllAKWRHGAlo+ESXykKAAAAAAAAAAAwAAAAAAAAEaphjojKOpF0qJaNXyu+n+CAAQAAgAAAAAAAAAAAA
public static TextMsg Deserialize(string msg) { xml xml = Deserialize(msg, typeof(xml)) as xml; return(xml); }
// note: it's possible to create a valid formatter, and have an error. Like, when the syntax is partially right // In that case, I will just use what is valid private static column_formatter_base create_formatter(string name, string syntax, ref string error) { error = ""; column_formatter_base result = null; switch (name) { case "cell": result = new cell(); break; case "format": result = new column_formatters.format(); break; case "picture": result = new picture(); break; case "stack_trace": case "stack-trace": result = new stack_trace(); break; case "xml": result = new xml(); break; default: error = "Invalid formatter name: " + name; break; } // load_syntax if (result != null) try { result.load_syntax(new settings_as_string(syntax), ref error); } catch (Exception e) { logger.Error("can't load formatter " + e.Message); error = "Cannot load " + name + ". Invalid syntax"; } return result; }
protected void BtnCargar_Click(object sender, EventArgs e) { try{ validarDatos(); String vExtension = "", vBody = ""; vExtension = Path.GetExtension(FUArchivo.FileName); String archivoLog = string.Format("{0}_{1}", Convert.ToString(Session["usuario"]), DateTime.Now.ToString("yyyyMMddHHmmss")); String vDireccionCarga = ConfigurationManager.AppSettings["RUTA_SERVER_DOCS"].ToString() + LitTitulo.Text.ToLower(); //String vDireccionCarga = ConfigurationManager.AppSettings["RUTA_SERVER_DOCS_LOCAL"].ToString() + LitTitulo.Text.ToLower(); String vNombreArchivo = FUArchivo.FileName; vDireccionCarga += "/" + archivoLog + "_" + vNombreArchivo; FUArchivo.SaveAs(vDireccionCarga); Boolean vCargado = File.Exists(vDireccionCarga) ? true : false; if (vCargado) { xml vDatos = new xml(); String vIdArchivo = Session["DOCUMENTOS_TIPO_ID"].ToString(); Object[] vDatosMaestro = new object[20]; vDatosMaestro[0] = vIdArchivo; vDatosMaestro[1] = DDLCategoria.SelectedValue; vDatosMaestro[2] = TxNombre.Text; vDatosMaestro[3] = FUArchivo.FileName; vDatosMaestro[4] = vExtension; vDatosMaestro[5] = TxCodigo.Text; vDatosMaestro[6] = vDireccionCarga; vDatosMaestro[7] = DDLConfirmacion.SelectedValue; vDatosMaestro[8] = DDLCorreo.SelectedValue; vDatosMaestro[9] = TxFecha.Text != "" ? Convert.ToDateTime(TxFecha.Text).ToString("yyyy-MM-dd HH:mm:ss") : "1900-01-01 00:00:00"; vDatosMaestro[10] = DDLRecordatorios.SelectedValue; vDatosMaestro[11] = DDLEstado.SelectedValue; vDatosMaestro[12] = Session["USUARIO"].ToString(); vDatosMaestro[13] = CBxConfidencial.Checked; vDatosMaestro[14] = DDLNivelConfidencialidad.SelectedValue; vDatosMaestro[15] = DDLPropietario.SelectedValue != "0" ? DDLPropietario.SelectedValue : "0"; vDatosMaestro[16] = DDLCategoria.SelectedValue == "6" ? Convert.ToDateTime(TxFechaEx.Text).ToString("yyyy-MM-dd") : ""; vDatosMaestro[17] = DDLCategoria.SelectedValue == "6" ? TxProveedorEx.Text : ""; vDatosMaestro[18] = DDLCategoria.SelectedValue == "6" ? TxContactoEx.Text : ""; vDatosMaestro[19] = DDLCategoria.SelectedValue == "6" ? TxCorreoEx.Text : ""; String vXML = vDatos.ObtenerXMLDocumentos(vDatosMaestro); vXML = vXML.Replace("<?xml version=\"1.0\" encoding=\"utf-16\"?>", ""); String vQuery = "[RSP_Documentacion] 4,0" + ",'" + vXML + "'"; int vInfo = vConexion.obtenerId(vQuery); if (vInfo > 0) { DataTable vDataRef = new DataTable(); vDataRef.Columns.Add("idDocumento"); vDataRef.Columns.Add("nombre"); for (int i = 0; i < LBReferencia.Items.Count; i++) { if (LBReferencia.Items[i].Selected) { vDataRef.Rows.Add(LBReferencia.Items[i].Value, LBReferencia.Items[i].Text); } } if (vDataRef.Rows.Count > 0) { for (int i = 0; i < vDataRef.Rows.Count; i++) { vQuery = "[RSP_Documentacion] 25," + vDataRef.Rows[i]["idDocumento"].ToString() + ",NULL," + vInfo; vConexion.ejecutarSql(vQuery); } } DataTable vDTConfidenciales = (DataTable)Session["DOCUMENTOS_CORREOS"]; if (vIdArchivo == "1") { vBody = "Se ha creado un nuevo Boletín, por favor revisar el documento."; } else if (vIdArchivo == "2") { vBody = "Se ha creado un nuevo Formato, por favor revisar el documento."; } else if (vIdArchivo == "3") { vBody = "Se ha creado un nuevo Manual, por favor revisar el documento."; } else if (vIdArchivo == "4") { vBody = "Se ha creado una nueva Política, por favor revisar el documento."; } else if (vIdArchivo == "5") { vBody = "Se ha creado un nuevo Proceso, por favor revisar el documento."; } else if (vIdArchivo == "6") { vBody = "Se ha creado un nuevo documento Externo, por favor revisar el documento."; } if (DDLCategoria.SelectedValue == "1") { if (DDLCorreo.SelectedValue == "1") { String vConsulta = "[RSP_Documentacion] 6"; DataTable vData = vConexion.obtenerDataTable(vConsulta); for (int i = 0; i < vData.Rows.Count; i++) { String vTokenString = ""; CryptoToken.CryptoToken vToken = new CryptoToken.CryptoToken(); tokenClass vClassToken = new tokenClass() { usuario = Convert.ToInt32(vData.Rows[i]["idEmpleado"].ToString()) }; vTokenString = vToken.Encrypt(JsonConvert.SerializeObject(vClassToken), ConfigurationManager.AppSettings["TOKEN_DOC"].ToString()); vQuery = "[RSP_Documentacion] 8" + "," + vData.Rows[i]["idEmpleado"].ToString() + ",null," + vInfo + ",'" + vBody + "'" + ",0,'" + vTokenString + "'"; vConexion.ejecutarSql(vQuery); } } } else if (DDLCategoria.SelectedValue == "2" || DDLCategoria.SelectedValue == "4") { for (int i = 0; i < vDTConfidenciales.Rows.Count; i++) { String vTokenString = ""; if (DDLCorreo.SelectedValue == "1") { CryptoToken.CryptoToken vToken = new CryptoToken.CryptoToken(); tokenClass vClassToken = new tokenClass() { usuario = Convert.ToInt32(vDTConfidenciales.Rows[i]["idEmpleado"].ToString()), parametro1 = vInfo.ToString() }; vTokenString = vToken.Encrypt(JsonConvert.SerializeObject(vClassToken), ConfigurationManager.AppSettings["TOKEN_DOC"].ToString()); } vQuery = "[RSP_Documentacion] 8" + "," + vDTConfidenciales.Rows[i]["idEmpleado"].ToString() + ",null," + vInfo + ",'" + vBody + "'" + ",0,'" + vTokenString + "'"; vConexion.ejecutarSql(vQuery); } } else if (DDLCategoria.SelectedValue == "3") { vQuery = "[RSP_Documentacion] 23," + DDLGrupos.SelectedValue; DataTable vDataGrupo = vConexion.obtenerDataTable(vQuery); if (vDataGrupo.Rows.Count > 0) { for (int i = 0; i < vDataGrupo.Rows.Count; i++) { String vTokenString = ""; if (DDLCorreo.SelectedValue == "1") { CryptoToken.CryptoToken vToken = new CryptoToken.CryptoToken(); tokenClass vClassToken = new tokenClass() { usuario = Convert.ToInt32(vDataGrupo.Rows[i]["idEmpleado"].ToString()), parametro1 = vInfo.ToString() }; vTokenString = vToken.Encrypt(JsonConvert.SerializeObject(vClassToken), ConfigurationManager.AppSettings["TOKEN_DOC"].ToString()); } vQuery = "[RSP_Documentacion] 8" + "," + vDataGrupo.Rows[i]["idEmpleado"].ToString() + ",null," + vInfo + ",'" + vBody + "'" + ",0,'" + vTokenString + "'"; vConexion.ejecutarSql(vQuery); } } } MensajeLoad("Documento cargado con éxito.", WarningType.Success); } else { MensajeLoad("Solicitud no completada, favor comuníquese con sistemas.", WarningType.Danger); } } else { MensajeLoad("Solicitud no completada, favor comuníquese con sistemas.", WarningType.Danger); } limpiarModal(); cargarDatos(); UpdatePanel1.Update(); }catch (Exception ex) { MensajeLoad(ex.Message, WarningType.Danger); } }
private ModelInfo CreateModel(xml.model model) { NamingConventions conventions = new NamingConventions(); ModelInfo result = new ModelInfo(); if (!string.IsNullOrWhiteSpace(model.projectNamespace)) GlobalConfig.ProjectNamespace = model.projectNamespace; foreach (var modelItem in model.Items) { if (modelItem is config) { var config = (config) modelItem; if (config.serialization != null && !string.IsNullOrWhiteSpace(config.serialization.@namespace)) GlobalConfig.SerializationNamespace = [email protected](); } else if (modelItem is type) { var type = (type) modelItem; var ti = new TypeInfo(type.name, model.@namespace, type.immutable, type.cloneable, type.serializable, type.equals); if (type.deepCopySpecified) ti.DeepCopy = type.deepCopy; if (!string.IsNullOrWhiteSpace(type.doc)) ti.Documentation = type.doc; if (!string.IsNullOrWhiteSpace(type.implements)) { var impls = type.implements.Split(','); foreach (var impl in impls) { var tmp = impl.Trim(); if (!string.IsNullOrWhiteSpace(tmp)) ti.Implements.Add(tmp); } } if (type.extends != null && type.extends.Trim() != "") ti.Extends = type.extends.Trim(); if (type.baseClass != null) { var bc = type.baseClass; if (bc.hasChildPropertyChangedSpecified) ti.BaseClass.HasChildPropertyChanged = bc.hasChildPropertyChanged; if (bc.hasPropertyChangedSpecified) ti.BaseClass.HasPropertyChanged = bc.hasPropertyChanged; if (bc.hasChildPropertyChangingSpecified) ti.BaseClass.HasChildPropertyChanging = bc.hasChildPropertyChanging; if (bc.hasPropertyChangingSpecified) ti.BaseClass.HasPropertyChanging = bc.hasPropertyChanging; if (bc.hasCopyFromSpecified) ti.BaseClass.HasCopyFrom = bc.hasCopyFrom; if (bc.hasPropertiesSpecified) ti.BaseClass.HasProperties = bc.hasProperties; } foreach (var item in type.Items) { if (item is property) { var property = (property) item; var prop = new PropertyInfo(conventions, ti, property.name, property.type, property.required, false); if (property.deepCopySpecified) prop.DeepCopy = property.deepCopy; if (!string.IsNullOrWhiteSpace(property.doc)) prop.Documentation = property.doc; if (!string.IsNullOrWhiteSpace(property.@default)) prop.DefaultValue = property.@default; if (!string.IsNullOrWhiteSpace(property.getter) && ValidateVisibility(property.getter, "getter")) prop.GetterVisibility = property.getter; if (!string.IsNullOrWhiteSpace(property.setter) && ValidateVisibility(property.setter, "setter")) prop.SetterVisibility = property.setter; if (property.receiveInConstructorSpecified && property.receiveInConstructor) prop.ReceiveInConstructor = property.receiveInConstructor; if (property.precisionSpecified) prop.Precision = (double) property.precision; if (prop.Required && !prop.IsPrimitive) prop.Validations.Add(new ValidationInfo("value == null", property.requiredException ?? "new ArgumentNullException(property)", "#pragma warning disable 472\n// ReSharper disable ConditionIsAlwaysTrueOrFalse", "// ReSharper restore ConditionIsAlwaysTrueOrFalse\n#pragma warning restore 472")); prop.AddValidationAttrib(property.validationAttrib, property.validationException); prop.AddValidation(property.validation1, property.validationException); if (property.validation != null) { foreach (var validation in property.validation) { prop.AddValidationAttrib(validation.attrib, validation.exception); prop.AddValidation(validation.test, validation.exception); } } ti.Properties.Add(prop); } else if (item is component) { var component = (component) item; var comp = new ComponentInfo(conventions, ti, component.name, component.type, component.lazy); if (!string.IsNullOrWhiteSpace(component.doc)) comp.Documentation = component.doc; if (!string.IsNullOrWhiteSpace(component.@default)) comp.DefaultValue = component.@default; if (component.receiveInConstructorSpecified && component.receiveInConstructor) comp.ReceiveInConstructor = component.receiveInConstructor; comp.AddValidationAttrib(component.validationAttrib, component.validationException); comp.AddValidation(component.validation1, component.validationException); if (component.validation != null) { foreach (var validation in component.validation) { comp.AddValidationAttrib(validation.attrib, validation.exception); comp.AddValidation(validation.test, validation.exception); } } ti.Properties.Add(comp); } else if (item is collection) { var collection = (collection) item; var col = new CollectionInfo(conventions, ti, collection.name, collection.type, collection.lazy, collection.readOnly); if (collection.deepCopySpecified) col.DeepCopy = collection.deepCopy; if (!string.IsNullOrWhiteSpace(collection.doc)) col.Documentation = collection.doc; if (!string.IsNullOrWhiteSpace(collection.@default)) col.DefaultValue = collection.@default; ti.Properties.Add(col); } else if (item is computedproperty) { var computed = (computedproperty) item; var deps = (from d in computed.dependsOn.Split(',') where d.Trim() != "" select StringUtils.FirstUpper(d.Trim())); var prop = new ComputedPropertyInfo(conventions, ti, computed.name, computed.type, computed.cached, deps, computed.formula); if (!string.IsNullOrWhiteSpace(computed.getter) && ValidateVisibility(computed.getter, "getter")) prop.GetterVisibility = computed.getter; if (!string.IsNullOrWhiteSpace(computed.doc)) prop.Documentation = computed.doc; ti.Properties.Add(prop); } else if (item is @using) { var us = item as @using; ti.Using.Add(us.@namespace); } } result.AddType(ti); } else if (modelItem is @using) { var us = modelItem as @using; result.Using.Add(us.@namespace); } } return result; }
private void PosProcessXml(xml.model model) { model.@namespace = (model.@namespace ?? model.projectNamespace ?? GlobalConfig.ProjectNamespace ?? "").Trim(); foreach (var modelItem in model.Items) { if (modelItem is type) { var type = (type) modelItem; if (!type.immutableSpecified) type.immutable = false; if (!type.cloneableSpecified) type.cloneable = true; if (!type.serializableSpecified) type.serializable = true; if (!type.equalsSpecified) type.equals = false; if (type.Items == null) type.Items = new object[0]; foreach (var item in type.Items) { if (item is property) { var property = (property) item; property.name = StringUtils.FirstUpper(property.name); if (!property.requiredSpecified) property.required = false; } else if (item is component) { var component = (component) item; component.name = StringUtils.FirstUpper(component.name); if (!component.lazySpecified) component.lazy = false; } else if (item is collection) { var collection = (collection) item; collection.name = StringUtils.FirstUpper(collection.name); if (!collection.readOnlySpecified) collection.readOnly = false; if (!collection.lazySpecified) collection.lazy = false; } else if (item is computedproperty) { var computed = (computedproperty) item; computed.name = StringUtils.FirstUpper(computed.name); if (computed.dependsOn == null) computed.dependsOn = ""; if (computed.formula == null) computed.formula = ""; if (!computed.cachedSpecified) computed.cached = false; } } } else if (modelItem is @using) { @using us = modelItem as @using; us.@namespace = [email protected](); } } }
await context.Response.WriteAsync(xml, context.RequestAborted);
public Frontend.DataTypes.License GetLicenseInfo(xml xml) { return(new licenseMay2018()); }
/// <summary> /// 取消事件处理 /// </summary> /// <param name="x"></param> public void EventHandle_unSubscribe(xml x) { B_W_Fans _b_fan = new B_W_Fans(); _b_fan.UpdateFans(x.FromUserName, 2); }