protected void btnSale_Click(object sender, EventArgs e) { if (this.txtPhone.Text == this.txtConfirmation.Text) { if (isNumber(this.txtPhone.Text)) { wsProxy = new ServiceTAE.Service(); string XML_Sales = Utilities.Sales_Transaction(this.txtUser.Text, Session["Password"].ToString(), String.Empty, DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), this.txtPhone.Text, Constants.REGISTER_FOLIO, ddlProduct.SelectedValue, this.ddlAmounts.SelectedValue.ToString()); string XML_Response = wsProxy.wsTransaction(XML_Sales); string Confirmation = Utilities.Get_XML_Value(XML_Response, "Confirmacion"); string Response_Folio = Utilities.Get_XML_Value(XML_Response, "Folio"); string Description = Utilities.Get_XML_Value(XML_Response, "Descripcion"); string Message = Utilities.Get_XML_Value(XML_Response, "Aviso"); if (Confirmation != "00") { this.lblSales_Message.Text = "<table border=\"0\" align=\"center\"><tr><td align=\"center\"><img src=\"Images/cellphone.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + this.txtPhone.Text + "</td></tr><td align=\"center\"><img src=\"Images/folio.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Response_Folio + "</td></tr><td><img src=\"Images/error.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#880000;\"><b>" + Confirmation + "</b> " + Description + "</td></tr><tr><td align=\"center\"><img src=\"Images/alert2.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Message + "</td></tr></table>"; } else { this.lblSales_Message.Text = "<table border=\"0\" align=\"center\"><tr><td align=\"center\"><img src=\"Images/cellphone.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + this.txtPhone.Text + "</td></tr><td align=\"center\"><img src=\"Images/folio.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Response_Folio + "</td></tr><td><img src=\"Images/success.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#008800;\"><b>" + Confirmation + "</b> " + Description + "</td></tr><tr><td align=\"center\"><img src=\"Images/alert2.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Message + "</td></tr></table>"; this.lblTicket_Carrier.Text = ddlProduct.SelectedItem.Text; this.lblTicket_Phone.Text = this.txtPhone.Text; this.lblTicket_Folio.Text = Response_Folio; this.lblTicket_Amount.Text = string.Format("${0:#,#.00}", double.Parse(this.ddlAmounts.SelectedValue.ToString())); this.lblTicket_Date.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); this.pnlSales.Visible = false; this.pnlTicket.Visible = true; } } else { this.lblSales_Message.Text = "<table border=\"0\" align=\"center\"><tr><td><img src=\"Images/error.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#880000;\"> Número incorrecto!</td></tr></table>"; } } else { this.lblSales_Message.Text = "<table border=\"0\" align=\"center\"><tr><td><img src=\"Images/error.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#880000;\"> Números no son idénticos!</td></tr></table>"; } this.txtPhone.Text = String.Empty; this.txtConfirmation.Text = String.Empty; }
protected void btnService_Click(object sender, EventArgs e) { if (isDouble(this.txtServiceAmount.Text)) { wsProxy = new ServiceTAE.Service(); string XML_Sales = Utilities.Sales_Transaction(this.txtUser.Text, Session["Password"].ToString(), String.Empty, DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), this.txtReference.Text, Constants.REGISTER_FOLIO, this.ddlServices.SelectedValue, this.txtServiceAmount.Text); string XML_Response = wsProxy.wsTransaction(XML_Sales); string Confirmation = Utilities.Get_XML_Value(XML_Response, "Confirmacion"); string Folio = Utilities.Get_XML_Value(XML_Response, "Folio"); string Description = Utilities.Get_XML_Value(XML_Response, "Descripcion"); string Message = Utilities.Get_XML_Value(XML_Response, "Aviso"); string Reference = this.txtReference.Text; if (Reference.Length > 15) { Reference = Reference.Substring(1, 15); } if (Confirmation != "00") { this.lblServiceMessage.Text = "<table border=\"0\" align=\"center\"><tr><td align=\"center\"><img src=\"Images/service.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Reference + "...</td></tr><td align=\"center\"><img src=\"Images/folio.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Folio + "</td></tr><td><img src=\"Images/error.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#880000;\"><b>" + Confirmation + "</b> " + Description + "</td></tr><tr><td align=\"center\"><img src=\"Images/alert2.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Message + "</td></tr></table>"; } else { this.lblServiceMessage.Text = "<table border=\"0\" align=\"center\"><tr><td align=\"center\"><img src=\"Images/service.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Reference + "...</td></tr><td align=\"center\"><img src=\"Images/folio.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Folio + "</td></tr><td><img src=\"Images/success.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#008800;\"><b>" + Confirmation + "</b> " + Description + "</td></tr><tr><td align=\"center\"><img src=\"Images/alert2.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#000000;\">" + Message + "</td></tr></table>"; this.lblTicket_Service_Name.Text = this.ddlServices.SelectedItem.Text; this.lblTicket_Service_Reference.Text = this.txtReference.Text; this.lblTicket_Service_Folio.Text = Folio; this.lblTicket_Service_Amount.Text = string.Format("${0:#,#.00}", double.Parse(this.txtServiceAmount.Text)); this.lblTicket_Service_Date.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); this.pnlServices.Visible = false; this.pnlTicket_Service.Visible = true; } } else { this.lblServiceMessage.Text = "<table border=\"0\" align=\"center\"><tr><td><img src=\"Images/error.png\" width=\"24\" height=\"24\"/></td><td style=\"color:#880000;\"> Monto incorrecto!</td></tr></table>"; } }