Example #1
0
        public IHttpActionResult PutLineas(int id, Lineas lineas)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != lineas.Row)
            {
                return(BadRequest());
            }

            db.Entry(lineas).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!LineasExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Example #2
0
        public async Task ActionBegin(ActionEventArgs <Lineas> args)
        {
            if (args.RequestType == Syncfusion.Blazor.Grids.Action.Save)
            {
                HttpResponseMessage response;
                bool   found = lineas.Any(p => p.CG_LINEA == args.Data.CG_LINEA);
                Lineas ur    = new Lineas();

                if (!found)
                {
                    args.Data.CG_CIA  = 1;
                    args.Data.USUARIO = "User";
                    response          = await Http.PostAsJsonAsync("api/Lineas", args.Data);

                    args.Data.CG_LINEA = lineas.Max(s => s.CG_LINEA) + 1;
                }
                else
                {
                    response = await Http.PutAsJsonAsync($"api/Lineas/{args.Data.CG_LINEA}", args.Data);
                }

                if (response.StatusCode == System.Net.HttpStatusCode.Created)
                {
                }
            }

            if (args.RequestType == Syncfusion.Blazor.Grids.Action.Delete)
            {
                await EliminarLinea(args);
            }
        }
Example #3
0
    protected void btnAgregar_Click(object sender, EventArgs e)
    {
        lblErrores.Text = "";
        Lineas linea = new Lineas();

        linea.Unidad = txtClave.Text;
        linea.verificaExiste();
        bool existeLinea = linea.Existe;

        if (!existeLinea)
        {
            SqlDataSource1.InsertCommand = "insert into catlineas(idLinea,descripcionLinea) values(@idLinea,@descripcionLinea)";
            SqlDataSource1.InsertParameters.Add("idLinea", txtClave.Text);
            SqlDataSource1.InsertParameters.Add("descripcionLinea", txtDescripcion.Text);
            try
            {
                SqlDataSource1.Insert();
                GridView1.DataBind();
                txtClave.Text = txtDescripcion.Text = "";
            }
            catch (Exception ex)
            {
                lblErrores.Text = "Error al agregar la línea " + txtClave.Text + ": " + ex.Message;
            }
        }
        else
        {
            lblErrores.Text = "La línea a ingresar ya se encuentra registrada";
        }
    }
Example #4
0
        public async Task <Lineas> postLinea(Lineas linea)
        {
            Lineas linear = new Lineas();

            linear.Producto = linea.Producto;
            linear.Cantidad = linea.Cantidad;
            linear.Precio   = linea.Precio;
            linear.iDVenta  = linea.iDVenta;
            var jsonObj = JsonConvert.SerializeObject(linear);

            using (HttpClient client = new HttpClient())
            {
                StringContent content = new StringContent(jsonObj.ToString(), Encoding.UTF8, "application/json");
                var           request = new HttpRequestMessage()
                {
                    RequestUri = new Uri("https://paladarweb.somee.com/Api/api/Lineas"),
                    Method     = HttpMethod.Post,
                    Content    = content
                };
                var response = await client.SendAsync(request).ConfigureAwait(false);

                string dataResult = response.Content.ReadAsStringAsync().Result;
                Lineas result     = JsonConvert.DeserializeObject <Lineas>(dataResult);
                return(result);
            }
        }
Example #5
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         checaSesiones();
         if (usuarioLog != null)
         {
             if (e.Row.RowState.ToString() == "Normal" || e.Row.RowState.ToString() == "Alternate")
             {
                 var    btnEliminar = e.Row.Cells[2].Controls[1].FindControl("btnEliminar") as Button;
                 string clave       = DataBinder.Eval(e.Row.DataItem, "idLinea").ToString();
                 Lineas linea       = new Lineas();
                 linea.Unidad = clave;
                 linea.verificaRelacion();
                 if (linea.Relacionado)
                 {
                     btnEliminar.Text     = "Elimina";
                     btnEliminar.Enabled  = false;
                     btnEliminar.CssClass = "btn-default ancho50px";
                 }
                 else
                 {
                     btnEliminar.OnClientClick = "return confirm('¿Está seguro de eliminar la Línea " + clave + "?')";
                     btnEliminar.Text          = "Elimina";
                     btnEliminar.Enabled       = true;
                     btnEliminar.CssClass      = "btn-danger ancho50px";
                 }
             }
         }
         else
         {
             Response.Redirect("Default.aspx");
         }
     }
 }
        public ActionResult DeleteConfirmed(int id)
        {
            Lineas lineas = db.Lineas.Find(id);

            db.Lineas.Remove(lineas);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #7
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            LoadUILabelText(UILabelClientsTitle, "CLIENTE PACTIA");


            #region Gestures
            UITapGestureRecognizer UIImageViewTap1 = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"http://pactia.com");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar abrir el enlace");
                }
            });
            UIViewClientsPactiacom.UserInteractionEnabled = true;
            UIViewClientsPactiacom.AddGestureRecognizer(UIImageViewTap1);

            UITapGestureRecognizer UIImageViewTap2 = new UITapGestureRecognizer(() =>
            {
                Service service     = new Service();
                Constants constants = new Constants();
                try
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                    iOSFunctions.CallPhone("tel:" + lineas.Telefono);
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar realizar la llamada");
                }
            });
            UIViewClientsCall.UserInteractionEnabled = true;
            UIViewClientsCall.AddGestureRecognizer(UIImageViewTap2);

            UITapGestureRecognizer UIImageViewTap3 = new UITapGestureRecognizer(() =>
            {
                try
                {
                    ContactViewController viewController = this.Storyboard.InstantiateViewController("ContactViewControllerId") as ContactViewController;
                    viewController.BusinessLine          = "Portafolio";
                    viewController.SubBusinessLine       = "Portafolio";
                    this.NavigationController.PushViewController(viewController, true);
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewClientsContactUs.UserInteractionEnabled = true;
            UIViewClientsContactUs.AddGestureRecognizer(UIImageViewTap3);
            #endregion
        }
Example #8
0
        public IHttpActionResult GetLineas(int id)
        {
            Lineas lineas = db.Lineas.Find(id);

            if (lineas == null)
            {
                return(NotFound());
            }

            return(Ok(lineas));
        }
 public ActionResult Edit([Bind(Include = "Id,Nombre,Empresa,Estado")] Lineas lineas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lineas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Empresa = new SelectList(db.Empresa, "RUC", "RazonSocial", lineas.Empresa);
     ViewBag.Estado  = new SelectList(db.Estado, "Codigo", "Descripcion", lineas.Estado);
     return(View(lineas));
 }
Example #10
0
        public IHttpActionResult PostLineas(Lineas lineas)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Lineas.Add(lineas);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = lineas.Row }, lineas));
        }
Example #11
0
        public IHttpActionResult DeleteLineas(int id)
        {
            Lineas lineas = db.Lineas.Find(id);

            if (lineas == null)
            {
                return(NotFound());
            }

            db.Lineas.Remove(lineas);
            db.SaveChanges();

            return(Ok(lineas));
        }
Example #12
0
        public Linea AddLinea(string cuentaId, string descripcion, string monedaId, BalanceTypeEnum balance, decimal cambio, decimal monto)
        {
            if (!Borrador)
            {
                throw new AsientoAplicadoExeption();
            }

            int   numero = Lineas.Count + 1;
            Linea linea  = new(cuentaId, numero, descripcion, monedaId, balance, cambio, monto);

            Lineas.Add(linea);

            return(linea);
        }
Example #13
0
        public virtual LivestockBookLines LoadLineasByExpediente(long oid, bool childs)
        {
            LivestockBookLines lineas = LivestockBookLines.GetChildListByExpediente(this, oid, childs);

            foreach (LivestockBookLine item in lineas)
            {
                if ((Lineas.GetItem(item.Oid) == null) && (!Lineas.ContainsDeleted(item.Oid)))
                {
                    Lineas.AddItem(item);
                }
            }

            return(lineas);
        }
        // GET: Lineas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lineas lineas = db.Lineas.Find(id);

            if (lineas == null)
            {
                return(HttpNotFound());
            }
            return(View(lineas));
        }
Example #15
0
        private async void ButtonEventHandler(object sender, EventArgs e)
        {
            Constants constants = new Constants();

            if (sender == buttonMeetingSend)
            {
                if (SharedFunctions.IsEmptyOrNullString(textFieldMeetingUser.Text) == true || SharedFunctions.IsEmptyOrNullString(textFileldMeetingBusinessName.Text) == true || SharedFunctions.IsEmptyOrNullString(textFieldMeetingPhoneNumber.Text) == true || SharedFunctions.IsEmptyOrNullString(textFieldMeetingMessage.Text) == true)
                {
                    SimpleAlert("Notificación", "Debe completar los campos");
                }
                else if (BusinessLine == "Seleccionar opción" || BusinessLine == null)
                {
                    SimpleAlert("Notificación", "Debe seleccionar una línea de negocio");
                }
                else
                {
                    if (switchMeetingAcceptConditionState == true)
                    {
                        IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
                        if (IsInternetConnectionAvailable == true)
                        {
                            string MailState = string.Empty;
                            var    bounds    = UIScreen.MainScreen.Bounds;
                            loadingIndicator = new LoadingIndicator(bounds, "Enviando mensaje...");
                            View.Add(loadingIndicator);
                            await Task.Delay(100);

                            Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                            MailState = SharedFunctions.SendEmail("Solicitamos cita para: " + BusinessLine, "Favor agendar cita a nombre de:  " + textFieldMeetingUser.Text + Environment.NewLine + "Funcionario de la empresa: " + textFileldMeetingBusinessName.Text + Environment.NewLine + "Nos pueden contactar via Email: " + textFieldMeetingMail.Text + Environment.NewLine + "Teléfono: " + textFieldMeetingPhoneNumber.Text + Environment.NewLine + "Mensaje: " + textFieldMeetingMessage.Text + Environment.NewLine + Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                            loadingIndicator.Hide();
                            SimpleAlert("Notificación", MailState);
                            textFieldMeetingUser.Text          = "";
                            textFieldMeetingMail.Text          = "";
                            textFieldMeetingMessage.Text       = "";
                            textFieldMeetingPhoneNumber.Text   = "";
                            textFileldMeetingBusinessName.Text = "";
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        SimpleAlert("Notificación", "Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                    }
                }
            }
        }
        // GET: Lineas/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Lineas lineas = db.Lineas.Find(id);

            if (lineas == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Empresa = new SelectList(db.Empresa, "RUC", "RazonSocial", lineas.Empresa);
            ViewBag.Estado  = new SelectList(db.Estado, "Codigo", "Descripcion", lineas.Estado);
            return(View(lineas));
        }
Example #17
0
        public async Task ClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Text == "Copy")
            {
                if (this.Grid.SelectedRecords.Count > 0)
                {
                    foreach (Lineas selectedRecord in this.Grid.SelectedRecords)
                    {
                        bool isConfirmed = await JsRuntime.InvokeAsync <bool>("confirm", "Seguro de que desea copiar la Clase?");

                        if (isConfirmed)
                        {
                            Lineas Nuevo = new Lineas();

                            Nuevo.DES_LINEA = selectedRecord.DES_LINEA;
                            Nuevo.CG_CIA    = 1;
                            Nuevo.USUARIO   = "User";

                            var response = await Http.PostAsJsonAsync("api/Lineas", Nuevo);

                            Nuevo.CG_LINEA = lineas.Max(s => s.CG_LINEA) + 1;

                            if (response.StatusCode == System.Net.HttpStatusCode.Created)
                            {
                                Grid.Refresh();
                                var scrap = await response.Content.ReadFromJsonAsync <Lineas>();
                                await InvokeAsync(StateHasChanged);

                                Nuevo.CG_LINEA = scrap.CG_LINEA;
                                lineas.Add(Nuevo);
                                var itemsJson = JsonSerializer.Serialize(scrap);
                                Console.WriteLine(itemsJson);
                                //toastService.ShowToast($"Registrado Correctemente.Vale {StockGuardado.VALE}", TipoAlerta.Success);
                                lineas.OrderByDescending(p => p.CG_LINEA);
                            }
                        }
                    }
                }
                Refresh();
            }
            if (args.Item.Text == "Excel Export")
            {
                await this.Grid.ExcelExport();
            }
        }
Example #18
0
        public async Task <Lineas> deleteLinea(Lineas linea)
        {
            string iD      = linea.Row.ToString();
            Lineas linear  = new Lineas();
            var    jsonObj = JsonConvert.SerializeObject(linear);

            using (HttpClient client = new HttpClient())
            {
                StringContent content = new StringContent(jsonObj.ToString(), Encoding.UTF8, "application/json");
                var           request = new HttpRequestMessage()
                {
                    RequestUri = new Uri("https://paladarweb.somee.com/Api/api/Lineas/" + iD + ""),
                    Method     = HttpMethod.Delete,
                    Content    = content
                };
                var response = await client.SendAsync(request).ConfigureAwait(false);

                string dataResult = response.Content.ReadAsStringAsync().Result;
                Lineas result     = linear;
                return(result);
            }
        }
        ///////////////////////////////////////////////////////////////////////////////////////////

        #region Analisis_Semantico
        public void Obtener_Valores()
        {
            Semantica_DAL objTmp_dal = new Semantica_DAL();

            char[] delimitador = { '\udddd', '\xA' }; //   \udddd \xA
            string Frase       = Panel_Codigo.Text;

            string[] Texto = Frase.Split(delimitador);

            foreach (var Lineas in Texto)
            {
                if (PatronSemantico.Valida_Declaracion(Lineas))
                {
                    var valores = Lineas.Trim().Split(' ');
                    if (!(valores.Equals("<") || valores.Equals(";")))
                    {
                        objTmp_dal.TIPO   = valores[0];
                        objTmp_dal.NOMBRE = valores[1];
                        objTmp_dal.VALOR  = valores[3];
                        obj_Sema_bll.SAVE(objTmp_dal.TIPO, objTmp_dal.NOMBRE, objTmp_dal.VALOR);
                    }
                }
            }
        }
Example #20
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();
            System.Text.Encoding.GetEncoding(1252);
            ScrollViewAbout.ContentSize = new CGSize(0, View.Frame.Height + 1000);
            UIButtonPactiaCom.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonContactSend.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonAccepConditions.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);
            UIButtonCallUs.AddTarget(ButtonEventHandler, UIControlEvent.TouchUpInside);

            #region Gestures
            UITapGestureRecognizer UIViewBusiness0Tap = new UITapGestureRecognizer(() =>
            {
                VideoViewController viewController = this.Storyboard.InstantiateViewController("VideoViewControllerId") as VideoViewController;
                this.NavigationController.PushViewController(viewController, true);
            });
            UIImageViewPactiaVideo.UserInteractionEnabled = true;
            UIImageViewPactiaVideo.AddGestureRecognizer(UIViewBusiness0Tap);

            UITapGestureRecognizer UIViewFacebookTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.facebook.com/pactiaoficial/");
            });
            UIImageViewFacebook.UserInteractionEnabled = true;
            UIImageViewFacebook.AddGestureRecognizer(UIViewFacebookTap);

            UITapGestureRecognizer UIViewInstagramTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.instagram.com/pactiaoficial/");
            });
            UIImageViewInstagram.UserInteractionEnabled = true;
            UIImageViewInstagram.AddGestureRecognizer(UIViewInstagramTap);

            UITapGestureRecognizer UIViewLinkedlnTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.linkedin.com/company/pactia");
            });
            UIImageViewLinkedln.UserInteractionEnabled = true;
            UIImageViewLinkedln.AddGestureRecognizer(UIViewLinkedlnTap);

            UITapGestureRecognizer UIViewYoutubeTap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://www.youtube.com/channel/UCFH_l8cOLR-1FiS021ena2Q");
            });
            UIImageViewYoutube.UserInteractionEnabled = true;
            UIImageViewYoutube.AddGestureRecognizer(UIViewYoutubeTap);

            UITapGestureRecognizer UIViewBusiness2Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/comercio/");
            });
            UIViewBusiness2.UserInteractionEnabled = true;
            UIViewBusiness2.AddGestureRecognizer(UIViewBusiness2Tap);

            UITapGestureRecognizer UIViewBusiness3Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/oficinas/");
            });
            UIViewBusiness3.UserInteractionEnabled = true;
            UIViewBusiness3.AddGestureRecognizer(UIViewBusiness3Tap);
            UITapGestureRecognizer UIViewBusiness4Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/autoalmacenamiento/");
            });
            UIViewBusiness4.UserInteractionEnabled = true;
            UIViewBusiness4.AddGestureRecognizer(UIViewBusiness4Tap);
            UITapGestureRecognizer UIViewBusiness5Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/hoteles/");
            });
            UIViewBusiness5.UserInteractionEnabled = true;
            UIViewBusiness5.AddGestureRecognizer(UIViewBusiness5Tap);
            UITapGestureRecognizer UIViewBusiness6Tap = new UITapGestureRecognizer(() =>
            {
                iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/multifamily/");
            });
            UIViewBusiness6.UserInteractionEnabled = true;
            UIViewBusiness6.AddGestureRecognizer(UIViewBusiness6Tap);

            UITapGestureRecognizer UIViewBusiness7Tap = new UITapGestureRecognizer(() =>
            {
                BusinessLineContectViewController viewController = this.Storyboard.InstantiateViewController("BusinessLineContectViewControllerId") as BusinessLineContectViewController;
                viewController.BusinessName = "Logistica";
                viewController.Latitude     = "4.760737";
                viewController.Longitude    = "-74.165095";
                this.NavigationController.PushViewController(viewController, true);
            });
            UIViewBusiness1.UserInteractionEnabled = true;
            UIViewBusiness1.AddGestureRecognizer(UIViewBusiness7Tap);



            this.View.AddGestureRecognizer(new UITapGestureRecognizer(tap =>
            {
                View.EndEditing(true);
            })
            {
                NumberOfTapsRequired = 1
            });
            #endregion

            IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                try
                {
                    var bounds = UIScreen.MainScreen.Bounds;
                    loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                    View.Add(loadingIndicator);
                    await Task.Delay(10);

                    LoadUILabelText(UILabelPactiaTitle, "CONÓCENOS");
                    UIImageViewPactiaVideo.Image = UIImage.FromFile("videobackground.jpg");

                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=01");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness1);
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    LoadUILabelText(UILabelBusiness1Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness1Description, lineas.Texto2);
                    UIImageViewBusiness1Logo.Image = UIImage.FromFile("logikalogo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=02");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness2);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=02");
                    LoadUILabelText(UILabelBusiness2Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness2Description, lineas.Texto2);
                    UIImageViewBusiness2Logo.Image = UIImage.FromFile("logogranplaza.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=03");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness3);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=03");
                    LoadUILabelText(UILabelBusiness3Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness3Description, lineas.Texto2);
                    UIImageViewBusiness3Logo.Image = UIImage.FromFile("burologo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=77");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness4);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=05");
                    LoadUILabelText(UILabelBusiness4Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness4Description, lineas.Texto2);
                    UIImageViewBusiness4Logo.Image = UIImage.FromFile("ustoragelogo.png");

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=04");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness5);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=04");
                    LoadUILabelText(UILabelBusiness5Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness5Description, lineas.Texto2);

                    galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=78");
                    ImageService.Instance.LoadUrl(galeria.Url).Into(UIImageViewBusiness6);
                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=07");
                    LoadUILabelText(UILabelBusiness6Title, lineas.Nombre);
                    LoadUILabelText(UILabelBusiness6Description, lineas.Texto2);
                    UIButtonPactiaCom.Hidden = false;

                    var Panama      = new MKPointAnnotation();
                    var PanamaCoord = new CLLocationCoordinate2D(9.131443, -79.681025);
                    Panama.Title      = "Panamá";
                    Panama.Coordinate = PanamaCoord;

                    var Colombia      = new MKPointAnnotation();
                    var ColombiaCoord = new CLLocationCoordinate2D(5.156853, -74.039258);
                    Colombia.Title      = "Colombia";
                    Colombia.Coordinate = ColombiaCoord;

                    var Usa      = new MKPointAnnotation();
                    var UsaCoord = new CLLocationCoordinate2D(40.343302, -102.066399);
                    Usa.Title      = "Estados Unidos";
                    Usa.Coordinate = UsaCoord;

                    MKPointAnnotation[] CoordArray = new MKPointAnnotation[3];
                    CoordArray[0] = Panama;
                    CoordArray[1] = Colombia;
                    CoordArray[2] = Usa;
                    MKMapViewAbout.AddAnnotations(CoordArray);

                    var locationCoordinate = new CLLocationCoordinate2D(25.688297, -100.324346);
                    var coordinateSpan     = new MKCoordinateSpan(50, 80);
                    var coordinateRegion   = new MKCoordinateRegion(locationCoordinate, coordinateSpan);
                    MKMapViewAbout.SetRegion(coordinateRegion, true);
                    loadingIndicator.Hide();
                }
                catch (Exception ex)
                {
                    ExceptionAlert("Alerta", ex.Message);
                }
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
            float scrollViewHeight = 0.0f;
            float scrollViewWidth  = 0.0f;
            foreach (UIView view in ScrollViewAbout.Subviews)
            {
                scrollViewWidth  += (float)view.Frame.Size.Width;
                scrollViewHeight += (float)view.Frame.Size.Height;
            }
            ScrollViewAbout.ContentSize = new CGSize(0, scrollViewHeight + View.Frame.Height + 1500);
        }
Example #21
0
        private async void ButtonEventHandler(object sender, EventArgs e)
        {
            if (sender == UIButtonPactiaCom)
            {
                iOSFunctions.OpenUrl(@"http://pactia.com");
            }
            else if (sender == UIButtonCallUs)
            {
                Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                iOSFunctions.CallPhone("tel:" + lineas.Telefono);
            }
            else if (sender == UIButtonAccepConditions)
            {
                iOSFunctions.OpenUrl(@"http://pactia.com/wp-content/uploads/2017/10/politica-proteccion_datos.pdf");
            }
            else if (sender == UIButtonContactSend)
            {
                if (SharedFunctions.IsEmptyOrNullString(UITextFileldContactEmail.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFieldContactUser.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactBusinessName.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactMessage.Text) == true || SharedFunctions.IsEmptyOrNullString(UITextFileldContactPhoneNumber.Text) == true)
                {
                    SimpleAlert("Notificación", "Debe completar los campos");
                }
                else
                {
                    if (SwitchContactAcceptConditionState == true)
                    {
                        IsInternetConnectionAvailable = SharedFunctions.CheckInternetConnection();
                        if (IsInternetConnectionAvailable == true)
                        {
                            try
                            {
                                string MailState = string.Empty;
                                var    bounds    = UIScreen.MainScreen.Bounds;
                                loadingIndicator = new LoadingIndicator(bounds, "Enviando mensaje...");
                                View.Add(loadingIndicator);
                                await Task.Delay(100);

                                Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                                MailState = SharedFunctions.SendEmail("Información sobre portafolio ", "Nombre:  " + UITextFieldContactUser.Text + Environment.NewLine + "Funcionario de la empresa: " + UITextFileldContactBusinessName.Text + Environment.NewLine + "Nos pueden contactar via Email: " + UITextFileldContactEmail.Text + Environment.NewLine + "Teléfono: " + UITextFileldContactPhoneNumber.Text + Environment.NewLine + "Mensaje: " + UITextFileldContactMessage.Text + Environment.NewLine + Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                                loadingIndicator.Hide();
                                SimpleAlert("Notificación", MailState);
                                UITextFieldContactUser.Text          = "";
                                UITextFileldContactBusinessName.Text = "";
                                UITextFileldContactMessage.Text      = "";
                                UITextFileldContactEmail.Text        = "";
                                UITextFileldContactPhoneNumber.Text  = "";
                            }
                            catch (Exception ex)
                            {
                                ExceptionAlert("Alerta", ex.Message);
                            }
                        }
                        else
                        {
                            SimpleAlert("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente");
                        }
                    }
                    else
                    {
                        SimpleAlert("Notificación", "Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                    }
                }
            }
        }
Example #22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Contact);
            BusinessLine = Intent.Extras.GetString("businessline");
            var TextViewContactTitle = FindViewById <TextView>(Resource.Id.textViewContactTitle);

            TextViewContactTitle.Text = "Escríbenos " + BusinessLine;
            var ButtonContactSend             = FindViewById <Button>(Resource.Id.buttonContactSend);
            var SwitchContactAcceptConditions = FindViewById <Switch>(Resource.Id.switchContactAcceptConditions);
            var EditTextContactName           = FindViewById <EditText>(Resource.Id.editTextContactName);
            var EditTextContactEmail          = FindViewById <EditText>(Resource.Id.editTextContactEmail);
            var EditTextContactBusinessName   = FindViewById <EditText>(Resource.Id.editTextContactBusinessName);
            var EditTextContactPhoneNumber    = FindViewById <EditText>(Resource.Id.editTextContactPhoneNumber);
            var EditTextContactMessage        = FindViewById <EditText>(Resource.Id.editTextContactMessage);
            var SpinnerContactServiceLines    = FindViewById <Spinner>(Resource.Id.spinnerContactServiceLines);

            ButtonContactSend.Click += (object sender, EventArgs e) =>
            {
                IsInternetConnectionAvailable = sharedFunctions.CheckInternetConnection();
                if (IsInternetConnectionAvailable == true)
                {
                    try
                    {
                        if (sharedFunctions.IsEmptyOrNullString(EditTextContactName.Text) == true || sharedFunctions.IsEmptyOrNullString(EditTextContactBusinessName.Text) == true || sharedFunctions.IsEmptyOrNullString(EditTextContactPhoneNumber.Text) == true)
                        {
                            SimpleToast("Debe completar todos los campos");
                        }
                        else
                        {
                            if (SwitchContactAcceptConditions.Checked == true)
                            {
                                Lineas lineas    = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                                string MailState = sharedFunctions.SendEmail("Información sobre " + BusinessLine, "Nombre:  " + EditTextContactName.Text + System.Environment.NewLine + "Funcionario de la empresa: " + EditTextContactBusinessName.Text + System.Environment.NewLine + "Nos pueden contactar via Email: " + EditTextContactEmail.Text + System.Environment.NewLine + "Teléfono: " + EditTextContactPhoneNumber.Text + System.Environment.NewLine + "Mensaje: " + EditTextContactMessage.Text + System.Environment.NewLine + System.Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                                SimpleToast(MailState);
                                EditTextContactName.Text         = "";
                                EditTextContactBusinessName.Text = "";
                                EditTextContactEmail.Text        = "";
                                EditTextContactPhoneNumber.Text  = "";
                                EditTextContactMessage.Text      = "";
                            }
                            else
                            {
                                SimpleToast("Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                            }
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
                else
                {
                    AlertDialog("Alerta", "Por favor verifique su conexión a internet e intente nuevamente");
                }
            };
            IsInternetConnectionAvailable = sharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                if (BusinessLine == "")
                {
                    try
                    {
                        List <Proyectos> listaProyectos = service.HttpGet <List <Proyectos> >(constants.Url, constants.ProyectoController, constants.ProyectoMethod, string.Empty);
                        if (listaProyectos != null && listaProyectos.Count > 0)
                        {
                            foreach (var item in listaProyectos)
                            {
                                ServiceLines.Add(item.Nombre);
                            }
                        }
                        else
                        {
                            throw new Exception("No se encontraron registros.");
                        }
                        var ServiceLinesAdapter = new ArrayAdapter <string>(this.BaseContext, Android.Resource.Layout.SimpleSpinnerItem, ServiceLines);
                        ServiceLinesAdapter = new ArrayAdapter <string>(this.BaseContext, Android.Resource.Layout.SimpleSpinnerItem, ServiceLines);
                        SpinnerContactServiceLines.Adapter = ServiceLinesAdapter;
                    }
                    catch (Exception)
                    {
                        AlertDialog("Alerta", "El servicio no está disponible en el momento, intente nuevamente mas tarde");
                    }
                }
                else
                {
                    SpinnerContactServiceLines.Enabled = false;
                }
            }
            else
            {
                AlertDialog("Alerta", "Por favor verifique su conexión a internet e intente nuevamente");
            }
        }
Example #23
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Lineas    lineas    = new Lineas();
            Service   service   = new Service();
            Constants constants = new Constants();

            #region Reference controls
            var view = inflater.Inflate(Resource.Layout.fragmentPortfolio, container, false);
            var LinearLayoutPortfolio1             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio1);
            var LinearLayoutPortfolio2             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio2);
            var LinearLayoutPortfolio3             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio3);
            var LinearLayoutPortfolio4             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio4);
            var LinearLayoutPortfolio5             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio5);
            var LinearLayoutPortfolio6             = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutPortfolio6);
            var TextViewPortfolioTitle             = view.FindViewById <TextView>(Resource.Id.textViewPortfolioTitle);
            var TextViewPortfolioBusiness1Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness1Title);
            var TextViewPortfolioBusiness1SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness1SubTitle);
            var TextViewPortfolioBusiness2Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness2Title);
            var TextViewPortfolioBusiness2SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness2SubTitle);
            var TextViewPortfolioBusiness3Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness3Title);
            var TextViewPortfolioBusiness3SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness3SubTitle);
            var TextViewPortfolioBusiness4Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness4Title);
            var TextViewPortfolioBusiness4SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness4SubTitle);
            var TextViewPortfolioBusiness5Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness5Title);
            var TextViewPortfolioBusiness5SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness5SubTitle);
            var TextViewPortfolioBusiness6Title    = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness6Title);
            var TextViewPortfolioBusiness6SubTitle = view.FindViewById <TextView>(Resource.Id.textViewPortfolioBusiness6SubTitle);
            var TextViewPortfolioContentMore1      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore1);
            var TextViewPortfolioContentMore2      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore2);
            var TextViewPortfolioContentMore3      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore3);
            var TextViewPortfolioContentMore4      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore4);
            var TextViewPortfolioContentMore5      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore5);
            var TextViewPortfolioContentMore6      = view.FindViewById <TextView>(Resource.Id.textViewPortfolioContentMore6);
            #endregion

            #region Controls Clicks
            LinearLayoutPortfolio1.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(Activity, typeof(BusinessLineContentActivity));
                StartActivity(intent);
            };
            LinearLayoutPortfolio2.Click += (Object sender, EventArgs e) =>
            {
                var weburi = Android.Net.Uri.Parse("https://pactia.com/linea-negocio/comercio/");
                var intent = new Intent(Intent.ActionView, weburi);
                StartActivity(intent);
            };
            LinearLayoutPortfolio3.Click += (Object sender, EventArgs e) =>
            {
                var weburi = Android.Net.Uri.Parse("https://pactia.com/linea-negocio/oficinas/");
                var intent = new Intent(Intent.ActionView, weburi);
                StartActivity(intent);
            };
            LinearLayoutPortfolio4.Click += (Object sender, EventArgs e) =>
            {
                var weburi = Android.Net.Uri.Parse("https://pactia.com/linea-negocio/autoalmacenamiento/");
                var intent = new Intent(Intent.ActionView, weburi);
                StartActivity(intent);
            };
            LinearLayoutPortfolio5.Click += (Object sender, EventArgs e) =>
            {
                var weburi = Android.Net.Uri.Parse("https://pactia.com/linea-negocio/hoteles/");
                var intent = new Intent(Intent.ActionView, weburi);
                StartActivity(intent);
            };
            LinearLayoutPortfolio6.Click += (Object sender, EventArgs e) =>
            {
                var weburi = Android.Net.Uri.Parse("https://pactia.com/linea-negocio/multifamily/");
                var intent = new Intent(Intent.ActionView, weburi);
                StartActivity(intent);
            };
            #endregion

            #region Add custom font
            Typeface GillSansFont = Typeface.CreateFromAsset(Activity.Assets, "GillSans.ttf");
            TextViewPortfolioTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness1Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness1SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness2Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness2SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness3Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness3SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness4Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness4SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness5Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness5SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness6Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioBusiness6SubTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore1.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore2.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore3.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore4.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore5.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewPortfolioContentMore6.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            #endregion

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
            TextViewPortfolioBusiness1Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness1SubTitle.Text = lineas.Texto2;

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=02");
            TextViewPortfolioBusiness2Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness2SubTitle.Text = lineas.Texto2;

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=03");
            TextViewPortfolioBusiness3Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness3SubTitle.Text = lineas.Texto2;

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=05");
            TextViewPortfolioBusiness4Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness4SubTitle.Text = lineas.Texto2;

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=04");
            TextViewPortfolioBusiness5Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness5SubTitle.Text = lineas.Texto2;

            lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=07");
            TextViewPortfolioBusiness6Title.Text    = lineas.Nombre;
            TextViewPortfolioBusiness6SubTitle.Text = lineas.Texto2;

            return(view);
        }
Example #24
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            RequestWindowFeature(WindowFeatures.NoTitle);
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.BusinessLineContent);

            #region Controls references
            var TextViewBusinessLineContentTitle = FindViewById <TextView>(Resource.Id.textViewBusinessLineContentTitle);
            var TextViewBusiness1Description     = FindViewById <TextView>(Resource.Id.textViewBusiness1Description);

            var ImageViewBusiness1        = FindViewById <ImageView>(Resource.Id.imageViewBusinessLine1);
            var TextViewBusinessSkill1    = FindViewById <TextView>(Resource.Id.textViewBusinessSkill1);
            var TextViewBusinessSkill2    = FindViewById <TextView>(Resource.Id.textViewBusinessSkill2);
            var TextViewBusinessSkill3    = FindViewById <TextView>(Resource.Id.textViewBusinessSkill3);
            var TextViewBusinessSkill4    = FindViewById <TextView>(Resource.Id.textViewBusinessSkill4);
            var TextViewBusiness1Title    = FindViewById <TextView>(Resource.Id.textViewBusiness1Title);
            var imageViewBusiness1Action1 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action1);
            var imageViewBusiness1Action2 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action2);
            var imageViewBusiness1Action3 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action3);
            var imageViewBusiness1Action4 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action4);
            var imageViewBusiness1Action5 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action5);
            var imageViewBusiness1Action6 = FindViewById <ImageView>(Resource.Id.imageViewBusiness1Action6);


            var ImageViewBusiness2        = FindViewById <ImageView>(Resource.Id.imageViewBusinessLine2);
            var TextViewBusiness2Skill1   = FindViewById <TextView>(Resource.Id.textViewBusiness2Skill1);
            var TextViewBusiness2Skill2   = FindViewById <TextView>(Resource.Id.textViewBusiness2Skill2);
            var TextViewBusiness2Skill3   = FindViewById <TextView>(Resource.Id.textViewBusiness2Skill3);
            var TextViewBusiness2Skill4   = FindViewById <TextView>(Resource.Id.textViewBusiness2Skill4);
            var TextViewBusiness2Title    = FindViewById <TextView>(Resource.Id.textViewBusiness2Title);
            var imageViewBusiness2Action1 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action1);
            var imageViewBusiness2Action2 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action2);
            var imageViewBusiness2Action3 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action3);
            var imageViewBusiness2Action4 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action4);
            var imageViewBusiness2Action5 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action5);
            var imageViewBusiness2Action6 = FindViewById <ImageView>(Resource.Id.imageViewBusiness2Action6);


            var ImageViewBusiness3        = FindViewById <ImageView>(Resource.Id.imageViewBusinessLine3);
            var TextViewBusiness3Skill1   = FindViewById <TextView>(Resource.Id.textViewBusiness3Skill1);
            var TextViewBusiness3Skill2   = FindViewById <TextView>(Resource.Id.textViewBusiness3Skill2);
            var TextViewBusiness3Skill3   = FindViewById <TextView>(Resource.Id.textViewBusiness3Skill3);
            var TextViewBusiness3Skill4   = FindViewById <TextView>(Resource.Id.textViewBusiness3Skill4);
            var TextViewBusiness3Title    = FindViewById <TextView>(Resource.Id.textViewBusiness3Title);
            var imageViewBusiness3Action1 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action1);
            var imageViewBusiness3Action2 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action2);
            var imageViewBusiness3Action3 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action3);
            var imageViewBusiness3Action4 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action4);
            var imageViewBusiness3Action5 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action5);
            var imageViewBusiness3Action6 = FindViewById <ImageView>(Resource.Id.imageViewBusiness3Action6);

            var ImageViewBusiness4      = FindViewById <ImageView>(Resource.Id.imageViewBusinessLine4);
            var TextViewBusiness4Skill1 = FindViewById <TextView>(Resource.Id.textViewBusiness4Skill1);
            var TextViewBusiness4Skill2 = FindViewById <TextView>(Resource.Id.textViewBusiness4Skill2);
            var TextViewBusiness4Skill3 = FindViewById <TextView>(Resource.Id.textViewBusiness4Skill3);
            var TextViewBusiness4Skill4 = FindViewById <TextView>(Resource.Id.textViewBusiness4Skill4);
            var TextViewBusiness4Title  = FindViewById <TextView>(Resource.Id.textViewBusiness4Title);
            var TextViewPactiaMapTitle  = FindViewById <TextView>(Resource.Id.textViewPactiaMapTitle);

            var imageViewBusiness4Action1 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action1);
            var imageViewBusiness4Action2 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action2);
            var imageViewBusiness4Action3 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action3);
            var imageViewBusiness4Action4 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action4);
            var imageViewBusiness4Action5 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action5);
            var imageViewBusiness4Action6 = FindViewById <ImageView>(Resource.Id.imageViewBusiness4Action6);
            #endregion

            #region Controls Clicks Business 1
            imageViewBusiness1Action1.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(ContactActivity));
                intent.PutExtra("businessline", "Lógika Siberia");
                StartActivity(intent);
            };
            imageViewBusiness1Action2.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    var    uri    = Android.Net.Uri.Parse("tel:" + lineas.Telefono);
                    var    intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness1Action3.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(MapsActivity));
                intent.PutExtra("longitude", 4.760737);
                intent.PutExtra("latitude", -74.165095);
                intent.PutExtra("title", "Lógika Siberia");
                StartActivity(intent);
            };
            imageViewBusiness1Action4.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                    var     uri     = Android.Net.Uri.Parse(galeria.Pdf);
                    var     intent  = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness1Action5.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://logika.hauzd.com/logikasiberia");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    throw;
                }
            };
            imageViewBusiness1Action6.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    var intent = new Intent(this, typeof(PanoramaActivity));
                    intent.PutExtra("SelectionNumber", 0);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            ImageViewBusiness1.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://pactia.com/activo/logika-siberia-12/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            #endregion

            #region Controls Clicks Business 2
            imageViewBusiness2Action1.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(ContactActivity));
                intent.PutExtra("businessline", "Lógika Madrid");
                StartActivity(intent);
            };
            imageViewBusiness2Action2.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    var    uri    = Android.Net.Uri.Parse("tel:" + lineas.Telefono);
                    var    intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness2Action3.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(MapsActivity));
                intent.PutExtra("longitude", 4.742864);
                intent.PutExtra("latitude", -74.256246);
                intent.PutExtra("title", "Lógika Madrid");
                StartActivity(intent);
            };
            ImageViewBusiness2.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://pactia.com/activo/logika-siberia-12-2/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness2Action4.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                    var     uri     = Android.Net.Uri.Parse(galeria.Pdf);
                    var     intent  = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };

            imageViewBusiness2Action5.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                }
                catch (Exception)
                {
                }
            };

            imageViewBusiness2Action6.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    var intent = new Intent(this, typeof(PanoramaActivity));
                    intent.PutExtra("SelectionNumber", 1);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            #endregion

            #region Controls Clicks Business 3
            imageViewBusiness3Action1.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(ContactActivity));
                intent.PutExtra("businessline", "San Carlos I");
                StartActivity(intent);
            };
            imageViewBusiness3Action2.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    var    uri    = Android.Net.Uri.Parse("tel:" + lineas.Telefono);
                    var    intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            }; imageViewBusiness3Action3.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(MapsActivity));
                intent.PutExtra("longitude", 4.700809);
                intent.PutExtra("latitude", -74.184920);
                intent.PutExtra("title", "San Carlos I");
                StartActivity(intent);
            };
            ImageViewBusiness3.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://pactia.com/activo/parque-industrial-san-carlos-i/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness3Action4.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                    var     uri     = Android.Net.Uri.Parse(galeria.Pdf);
                    var     intent  = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            #endregion

            #region Controls Clicks Business 4
            imageViewBusiness4Action1.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(ContactActivity));
                intent.PutExtra("businessline", "Vía 40");

                StartActivity(intent);
            };
            imageViewBusiness4Action2.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    var    uri    = Android.Net.Uri.Parse("tel:" + lineas.Telefono);
                    var    intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            imageViewBusiness4Action3.Click += (Object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(MapsActivity));
                intent.PutExtra("longitude", 11.033809);
                intent.PutExtra("latitude", -74.815730);
                intent.PutExtra("title", "Vía 40");
                StartActivity(intent);
            };
            imageViewBusiness4Action4.Click += (Object sender, EventArgs e) =>
            {
                try
                {
                    Galeria galeria = service.HttpGet <Galeria>(constants.Url, constants.GaleriaController, constants.GaleriaMethod, "code=07");
                    var     uri     = Android.Net.Uri.Parse(galeria.Pdf);
                    var     intent  = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            var imageViewBusinessLineFacebook = FindViewById <ImageView>(Resource.Id.imageViewBusinessLineFacebook);
            imageViewBusinessLineFacebook.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://www.facebook.com/pactiaoficial/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    SimpleToast("Ha ocurrido un error al intentar abrir en enlace.");
                }
            };
            var ImageViewBusinessLineInstagram = FindViewById <ImageView>(Resource.Id.imageViewBusinessLineInstagram);
            ImageViewBusinessLineInstagram.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://www.instagram.com/pactiaoficial/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    SimpleToast("Ha ocurrido un error al intentar abrir en enlace.");
                }
            };
            var ImageViewBusinessLineLinkdln = FindViewById <ImageView>(Resource.Id.imageViewBusinessLineLinkdln);
            ImageViewBusinessLineLinkdln.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://www.linkedin.com/company/pactia");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    SimpleToast("Ha ocurrido un error al intentar abrir en enlace.");
                }
            };
            var ImageViewBusinessLineYoutube = FindViewById <ImageView>(Resource.Id.imageViewBusinessLineYoutube);
            ImageViewBusinessLineYoutube.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://www.youtube.com/channel/UCFH_l8cOLR-1FiS021ena2Q");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    SimpleToast("Ha ocurrido un error al intentar abrir en enlace.");
                }
            };
            ImageViewBusiness4.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://pactia.com/activo/logika-via-40/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                    SimpleToast("Ha ocurrido un error al intentar abrir en enlace.");
                }
            };
            #endregion

            LoadTextViewText(TextViewBusinessLineContentTitle, "Parques Industriales");
            BusinessName = "Logistica";
            if (BusinessName == "Logistica")
            {
                IsInternetConnectionAvailable = sharedFunctions.CheckInternetConnection();
                if (IsInternetConnectionAvailable == true)
                {
                    try
                    {
                        Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                        LoadTextViewText(TextViewBusinessLineContentTitle, lineas.Nombre);
                        LoadTextViewText(TextViewBusiness1Description, lineas.Texto2);
                        LoadTextViewText(TextViewPactiaMapTitle, "Parques Industriales");

                        List <Galeria> listaGaleria = service.HttpGet <List <Galeria> >(constants.Url, constants.GaleriaController, constants.GaleriaMethod1, "idProyecto=1&slider=1");
                        int            num          = 0;
                        if (listaGaleria != null && listaGaleria.Count > 0)
                        {
                            foreach (var galeria in listaGaleria)
                            {
                                if (num == 0)
                                {
                                    LoadData(07, ImageViewBusiness1, BusinessValues, ItemsList, TextViewBusiness1Title, TextViewBusinessSkill1, TextViewBusinessSkill2, TextViewBusinessSkill3, TextViewBusinessSkill4, galeria);

                                    num++;
                                }
                                else if (num == 1)
                                {
                                    LoadData(10, ImageViewBusiness2, BusinessValues, ItemsList, TextViewBusiness2Title, TextViewBusiness2Skill1, TextViewBusiness2Skill2, TextViewBusiness2Skill3, TextViewBusiness2Skill4, galeria);
                                    num++;
                                }
                                else if (num == 2)
                                {
                                    LoadData(14, ImageViewBusiness3, BusinessValues, ItemsList, TextViewBusiness3Title, TextViewBusiness3Skill1, TextViewBusiness3Skill2, TextViewBusiness3Skill3, TextViewBusiness3Skill4, galeria);
                                    num++;
                                }
                                else if (num == 3)
                                {
                                    LoadData(12, ImageViewBusiness4, BusinessValues, ItemsList, TextViewBusiness4Title, TextViewBusiness4Skill1, TextViewBusiness4Skill2, TextViewBusiness4Skill3, TextViewBusiness4Skill4, galeria);
                                    num++;
                                }
                            }
                        }
                        else
                        {
                            throw new Exception("");
                        }
                    }
                    catch (Exception)
                    {
                        AlertDialog("Alerta", "El servicio no está disponible en el momento, intente nuevamente mas tarde");
                    }
                }
                else
                {
                    AlertDialog("Alerta", "Por favor verifique su conexión a internet e intente nuevamente");
                }
            }

            #region Add custom font
            Typeface GillSansFont = Typeface.CreateFromAsset(Assets, "GillSans.ttf");
            TextViewBusinessLineContentTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness1Description.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness1Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusinessSkill1.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusinessSkill2.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusinessSkill3.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusinessSkill4.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness1Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);

            TextViewBusiness2Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness2Skill1.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness2Skill2.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness2Skill3.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness2Skill4.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness2Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);

            TextViewBusiness3Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness3Skill1.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness3Skill2.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness3Skill3.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness3Skill4.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness3Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);

            TextViewBusiness4Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness4Skill1.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness4Skill2.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness4Skill3.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness4Skill4.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewBusiness4Title.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            #endregion
        }
Example #25
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            #region Reference controls
            var view = inflater.Inflate(Resource.Layout.fragmentClients, container, false);
            var TextViewClientsTitle              = view.FindViewById <TextView>(Resource.Id.textViewClientsTitle);
            var TextViewClientsWebSiteTitle       = view.FindViewById <TextView>(Resource.Id.textViewClientsWebSiteTitle);
            var TextViewClientsWebSiteContent     = view.FindViewById <TextView>(Resource.Id.textViewClientsWebSiteContent);
            var TextViewClientsWebSiteContentMore = view.FindViewById <TextView>(Resource.Id.textViewClientsWebSiteContentMore);
            var LinearLayoutClientsWebSite        = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutClientsWebSite);
            var TextViewClientsCallTitle          = view.FindViewById <TextView>(Resource.Id.textViewClientsCallTitle);
            var TextViewClientsCallTitleMore      = view.FindViewById <TextView>(Resource.Id.textViewClientsCallTitleMore);
            var TextViewClientsCallContent        = view.FindViewById <TextView>(Resource.Id.textViewClientsCallContent);
            var LinearLayoutClientsCall           = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutClientsCall);
            var LinearLayoutClientsEmail          = view.FindViewById <LinearLayout>(Resource.Id.linearLayoutClientsEmail);
            var TextViewClientsMailTitle          = view.FindViewById <TextView>(Resource.Id.textViewClientsMailTitle);
            var TextViewClientsMailContent        = view.FindViewById <TextView>(Resource.Id.textViewClientsMailContent);
            var TextViewClientsMailContentMore    = view.FindViewById <TextView>(Resource.Id.textViewClientsMailTitleMore);
            #endregion

            #region Add custom font
            Typeface GillSansFont = Typeface.CreateFromAsset(Activity.Assets, "GillSans.ttf");
            TextViewClientsTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsWebSiteTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsWebSiteContent.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsWebSiteContentMore.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsCallTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsCallContent.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsCallTitleMore.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsMailTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsMailContent.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewClientsMailContentMore.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            #endregion

            #region Controls Clicks
            LinearLayoutClientsWebSite.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var uri    = Android.Net.Uri.Parse("https://pactia.com/");
                    var intent = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            LinearLayoutClientsCall.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    Service   service   = new Service();
                    Constants constants = new Constants();
                    Lineas    lineas    = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                    var       uri       = Android.Net.Uri.Parse("tel:" + lineas.Telefono);
                    var       intent    = new Intent(Intent.ActionView, uri);
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            LinearLayoutClientsEmail.Click += (object sender, EventArgs e) =>
            {
                try
                {
                    var intent = new Intent(Activity, typeof(ContactActivity));
                    intent.PutExtra("businessline", "Portafolio");
                    StartActivity(intent);
                }
                catch (Exception)
                {
                }
            };
            #endregion
            return(view);
        }
Example #26
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            #region Reference controls
            var view = inflater.Inflate(Resource.Layout.fragmentMeeting, container, false);
            var TextViewMeetingTitle          = view.FindViewById <TextView>(Resource.Id.textViewMeetingTitle);
            var SwitchMeetingAcceptConditions = view.FindViewById <Switch>(Resource.Id.switchMeetingAcceptConditions);
            var EditTextMeetingName           = view.FindViewById <EditText>(Resource.Id.editTextMeetingName);
            var EditTextMeetingEmail          = view.FindViewById <EditText>(Resource.Id.editTextMeetingEmail);
            var EditTextMeetingBusinessName   = view.FindViewById <EditText>(Resource.Id.editTextMeetingBusinessName);
            var EditTextMeetingPhoneNumber    = view.FindViewById <EditText>(Resource.Id.editTextMeetingPhoneNumber);
            var EditTextMeetingMessage        = view.FindViewById <EditText>(Resource.Id.editTextMeetingMessage);
            var ButtonMeetingSend             = view.FindViewById <Button>(Resource.Id.buttonMeetingSend);
            var SpinnerServiceLines           = view.FindViewById <Spinner>(Resource.Id.spinnerServiceLines);
            #endregion

            #region Add custom font
            Typeface GillSansFont = Typeface.CreateFromAsset(Activity.Assets, "GillSans.ttf");
            SwitchMeetingAcceptConditions.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            TextViewMeetingTitle.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            EditTextMeetingName.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            EditTextMeetingEmail.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            EditTextMeetingBusinessName.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            EditTextMeetingPhoneNumber.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            EditTextMeetingMessage.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            ButtonMeetingSend.SetTypeface(GillSansFont, TypefaceStyle.Normal);
            #endregion

            #region Controls Clicks
            ButtonMeetingSend.Click += (object sender, EventArgs e) =>
            {
                if (sharedFunctions.IsEmptyOrNullString(EditTextMeetingName.Text) == true || sharedFunctions.IsEmptyOrNullString(EditTextMeetingBusinessName.Text) == true || sharedFunctions.IsEmptyOrNullString(EditTextMeetingPhoneNumber.Text) == true)
                {
                    SimpleToast("Debe completar todos los campos");
                }
                else if (SpinnerServiceLines.SelectedItem.ToString() == "Acerca de")
                {
                    SimpleToast("Debe seleccionar una línea de negocio");
                }
                else
                {
                    if (SwitchMeetingAcceptConditions.Checked == true)
                    {
                        Lineas lineas    = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=06");
                        string MailState = sharedFunctions.SendEmail("Información sobre " + SpinnerServiceLines.SelectedItem, "Nombre:  " + EditTextMeetingName.Text + System.Environment.NewLine + "Funcionario de la empresa: " + EditTextMeetingBusinessName.Text + System.Environment.NewLine + "Nos pueden contactar via Email: " + EditTextMeetingEmail.Text + System.Environment.NewLine + "Teléfono: " + EditTextMeetingPhoneNumber.Text + System.Environment.NewLine + "Mensaje: " + EditTextMeetingMessage.Text + System.Environment.NewLine + System.Environment.NewLine, lineas.Email, lineas.EmailRemitente, lineas.Clave, lineas.Smtp);
                        SimpleToast(MailState);
                        EditTextMeetingName.Text         = "";
                        EditTextMeetingBusinessName.Text = "";
                        EditTextMeetingEmail.Text        = "";
                        EditTextMeetingPhoneNumber.Text  = "";
                        EditTextMeetingMessage.Text      = "";
                    }
                    else
                    {
                        SimpleToast("Antes de continuar debe aceptar las políticas de tratamiento de datos personales");
                    }
                }
            };
            #endregion

            IsInternetConnectionAvailable = sharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                try
                {
                    List <Proyectos> listaProyectos = service.HttpGet <List <Proyectos> >(constants.Url, constants.ProyectoController, constants.ProyectoMethod, string.Empty);
                    ServiceLines.Add("Acerca de");
                    if (listaProyectos != null && listaProyectos.Count > 0)
                    {
                        foreach (var item in listaProyectos)
                        {
                            ServiceLines.Add(item.Nombre);
                        }
                    }
                    else
                    {
                        throw new Exception("No se encontraron registros.");
                    }
                    var ServiceLinesAdapter = new ArrayAdapter <string>(this.Activity.BaseContext, Android.Resource.Layout.SimpleSpinnerItem, ServiceLines);
                    ServiceLinesAdapter         = new ArrayAdapter <string>(this.Activity.BaseContext, Android.Resource.Layout.SimpleSpinnerItem, ServiceLines);
                    SpinnerServiceLines.Adapter = ServiceLinesAdapter;
                }
                catch (Exception)
                {
                    AlertDialog("Alerta", "El servicio no está disponible en el momento, intente nuevamente mas tarde");
                }
            }
            else
            {
                AlertDialog("Alerta", "Por favor verifique su conexión a internet e intente nuevamente");
            }
            return(view);
        }
Example #27
0
 public virtual void ClearLineas()
 {
     Lineas.Clear();
 }
Example #28
0
 public virtual void AddLinea(Linea l)
 {
     Lineas.Add(l);
 }
Example #29
0
        public override async void ViewDidLoad()
        {
            base.ViewDidLoad();

            #region Gestures
            UITapGestureRecognizer UIViewBusiness1Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    BusinessLineContectViewController viewController = this.Storyboard.InstantiateViewController("BusinessLineContectViewControllerId") as BusinessLineContectViewController;
                    viewController.BusinessName = "Logistica";
                    viewController.Latitude     = "4.760737";
                    viewController.Longitude    = "-74.165095";
                    this.NavigationController.PushViewController(viewController, true);
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness1.UserInteractionEnabled = true;
            UIViewPortfolioBusiness1.AddGestureRecognizer(UIViewBusiness1Tap);

            UITapGestureRecognizer UIViewBusiness2Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/comercio/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness2.UserInteractionEnabled = true;
            UIViewPortfolioBusiness2.AddGestureRecognizer(UIViewBusiness2Tap);

            UITapGestureRecognizer UIViewBusiness3Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/oficinas/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness3.UserInteractionEnabled = true;
            UIViewPortfolioBusiness3.AddGestureRecognizer(UIViewBusiness3Tap);

            UITapGestureRecognizer UIViewBusiness4Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/autoalmacenamiento/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness4.UserInteractionEnabled = true;
            UIViewPortfolioBusiness4.AddGestureRecognizer(UIViewBusiness4Tap);

            UITapGestureRecognizer UIViewBusiness5Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/hoteles/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness5.UserInteractionEnabled = true;
            UIViewPortfolioBusiness5.AddGestureRecognizer(UIViewBusiness5Tap);

            UITapGestureRecognizer UIViewBusiness6Tap = new UITapGestureRecognizer(() =>
            {
                try
                {
                    iOSFunctions.OpenUrl(@"https://pactia.com/linea-negocio/multifamily/");
                }
                catch (Exception)
                {
                    SimpleAlert("Alerta", "Ha ocurrido un error al intentar completar la acción");
                }
            });
            UIViewPortfolioBusiness6.UserInteractionEnabled = true;
            UIViewPortfolioBusiness6.AddGestureRecognizer(UIViewBusiness6Tap);
            #endregion

            ScrollViewPortfolio.ContentSize = new CoreGraphics.CGSize(0, View.Frame.Height);
            IsInternetConnectionAvailable   = SharedFunctions.CheckInternetConnection();
            if (IsInternetConnectionAvailable == true)
            {
                Constants constants = new Constants();
                var       bounds    = UIScreen.MainScreen.Bounds;
                loadingIndicator = new LoadingIndicator(bounds, "Cargando contenido...");
                View.Add(loadingIndicator);
                await Task.Delay(10);

                try
                {
                    LoadUILabelText(UILabelPortfolioTitle, "PORTAFOLIO");
                    Lineas lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=01");
                    LoadUILabelText(UILabelPortfolioBusinessTitle1, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent1, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=02");
                    LoadUILabelText(UILabelPortfolioBusinessTitle2, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent2, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=03");
                    LoadUILabelText(UILabelPortfolioBusinessTitle3, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent3, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=05");
                    LoadUILabelText(UILabelPortfolioBusinessTitle4, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent4, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=04");
                    LoadUILabelText(UILabelPortfolioBusinessTitle5, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent5, lineas.Texto2);

                    lineas = service.HttpGet <Lineas>(constants.Url, constants.LineaController, constants.LineaMethod, "code=07");
                    LoadUILabelText(UILabelPortfolioBusinessTitle6, lineas.Nombre);
                    LoadUILabelText(UILabelPortfolioBusinessContent6, lineas.Texto2);
                }
                catch (Exception)
                {
                    var okCancelAlertController = UIAlertController.Create("Alerta", "El servicio no está disponible en el momento, intente de nuevo mas tarde", UIAlertControllerStyle.Alert);
                    okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                    PresentViewController(okCancelAlertController, true, null);
                }
                loadingIndicator.Hide();
            }
            else
            {
                var okCancelAlertController = UIAlertController.Create("Alerta", "Por favor verifique su conexión a internet e intenta nuevamente", UIAlertControllerStyle.Alert);
                okCancelAlertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Cancel, alert => Environment.Exit(0)));
                PresentViewController(okCancelAlertController, true, null);
            }
        }
Example #30
0
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            using (BinaryReader reader = new BinaryReader(FileUpload2.PostedFile.InputStream))
            {
                if (FileUpload2.HasFile == true)
                {
                    var Archivod     = reader.ReadBytes(FileUpload2.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivod);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Bulgarian",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader readerdos = new BinaryReader(FileUpload1.PostedFile.InputStream))
            {
                if (FileUpload1.HasFile == true)
                {
                    var Archivodos      = readerdos.ReadBytes(FileUpload1.PostedFile.ContentLength);
                    var transferentedos = Convert.ToBase64String(Archivodos);
                    var linea           = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Dansk",
                        Archivo    = transferentedos
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader3 = new BinaryReader(FileUpload3.PostedFile.InputStream))
            {
                if (FileUpload3.HasFile == true)
                {
                    var Archivodos    = reader3.ReadBytes(FileUpload3.PostedFile.ContentLength);
                    var transferente3 = Convert.ToBase64String(Archivodos);
                    var linea         = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Eesti keel",
                        Archivo    = transferente3
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader4 = new BinaryReader(FileUpload4.PostedFile.InputStream))
            {
                if (FileUpload4.HasFile == true)
                {
                    var Archivo4      = reader4.ReadBytes(FileUpload4.PostedFile.ContentLength);
                    var transferente4 = Convert.ToBase64String(Archivo4);
                    var linea         = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "English",
                        Archivo    = transferente4
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader5 = new BinaryReader(FileUpload5.PostedFile.InputStream))
            {
                if (FileUpload5.HasFile == true)
                {
                    var Archivo5      = reader5.ReadBytes(FileUpload5.PostedFile.ContentLength);
                    var transferente5 = Convert.ToBase64String(Archivo5);
                    var linea         = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Español",
                        Archivo    = transferente5
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload6.PostedFile.InputStream))
            {
                if (FileUpload6.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload6.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Français",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload7.PostedFile.InputStream))
            {
                if (FileUpload7.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload7.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Deutsch",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload8.PostedFile.InputStream))
            {
                if (FileUpload8.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload8.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Gaeilge",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload9.PostedFile.InputStream))
            {
                if (FileUpload9.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload9.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Greek",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload10.PostedFile.InputStream))
            {
                if (FileUpload10.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload10.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Hrvatski Jezik",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload11.PostedFile.InputStream))
            {
                if (FileUpload11.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload11.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Italiano",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload12.PostedFile.InputStream))
            {
                if (FileUpload12.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload12.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Latviešu",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload13.PostedFile.InputStream))
            {
                if (FileUpload13.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload13.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Lietuvių",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload14.PostedFile.InputStream))
            {
                if (FileUpload14.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload14.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Magyar",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload15.PostedFile.InputStream))
            {
                if (FileUpload15.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload15.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Malti",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload16.PostedFile.InputStream))
            {
                if (FileUpload16.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload16.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Nederlands",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload17.PostedFile.InputStream))
            {
                if (FileUpload17.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload17.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Norsk",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload18.PostedFile.InputStream))
            {
                if (FileUpload18.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload18.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Polski",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload19.PostedFile.InputStream))
            {
                if (FileUpload19.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload19.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Português",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload20.PostedFile.InputStream))
            {
                if (FileUpload20.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload20.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Română",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload21.PostedFile.InputStream))
            {
                if (FileUpload21.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload21.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Russian",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload22.PostedFile.InputStream))
            {
                if (FileUpload22.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload22.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Slovenčina",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload23.PostedFile.InputStream))
            {
                if (FileUpload23.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload23.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Slovenščina",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload24.PostedFile.InputStream))
            {
                if (FileUpload24.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload24.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Suomi",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload25.PostedFile.InputStream))
            {
                if (FileUpload25.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload25.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Svenska",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload26.PostedFile.InputStream))
            {
                if (FileUpload26.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload26.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Türkçe",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            using (BinaryReader reader = new BinaryReader(FileUpload27.PostedFile.InputStream))
            {
                if (FileUpload27.HasFile == true)
                {
                    var Archivo      = reader.ReadBytes(FileUpload27.PostedFile.ContentLength);
                    var transferente = Convert.ToBase64String(Archivo);
                    var linea        = new Lineas()
                    {
                        Clase      = CLASE,
                        NombreProd = NOMBRE,
                        Idioma     = "Čeština",
                        Archivo    = transferente
                    };
                    Lineas.Add(linea);
                }
            }
            for (int i = 0; i < Lineas.Count; i++)
            {
                using (SqlConnection openCon = new SqlConnection("workstation id=tarragobrands.mssql.somee.com;packet size=4096;user id=tarragobrands_SQLLogin_1;pwd=mjmdlqn93g;data source=tarragobrands.mssql.somee.com;persist security info=False;initial catalog=tarragobrands"))
                {
                    string saveStaff = "INSERT into Productos (Nombre, Clase, Idioma, Archivo, Codigo) VALUES (@Nombre, @Clase, @Idioma, @Archivo, @Codigo)";

                    using (SqlCommand querySaveStaff = new SqlCommand(saveStaff))
                    {
                        querySaveStaff.Connection = openCon;
                        querySaveStaff.Parameters.Add("@Nombre", SqlDbType.VarChar).Value  = NOMBRE;
                        querySaveStaff.Parameters.Add("@Codigo", SqlDbType.VarChar).Value  = CODIGO;
                        querySaveStaff.Parameters.Add("@Clase", SqlDbType.VarChar).Value   = CLASE;
                        querySaveStaff.Parameters.Add("@Idioma", SqlDbType.VarChar).Value  = Lineas[i].Idioma;
                        querySaveStaff.Parameters.Add("@Archivo", SqlDbType.VarChar).Value = Lineas[i].Archivo;
                        try
                        {
                            openCon.Open();
                            querySaveStaff.ExecuteNonQuery();
                            openCon.Close();
                        }
                        catch (SqlException ex)
                        {
                            Response.Write("Error" + ex);
                        }
                    }
                }
            }
            Response.Write("<script>alert('PRODUCTO CREADO')</script>");
        }