Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="productId"></param>
        /// <param name="type">==NULL mặc định hình</param>
        /// <param name="type">==1:map</param>
        private void BindData(int type)
        {
            GetId();

            UploadImageBLL bll = new UploadImageBLL();

            lst = bll.GetList(string.Empty, productId.ToString(), "1", type, 1, 100, out total);
            if (total > 0)
            {
                grdMultiMaps.DataSource = lst;
                grdMultiMaps.DataBind();

                grdMultiMaps.Columns[4].Visible = true;
            }
            else
            {
                PNK_UploadImage pnk = new PNK_UploadImage();
                DataTable       dt  = Common.UtilityLocal.ObjectToData(pnk);
                grdMultiMaps.DataSource = dt;
                grdMultiMaps.DataBind();

                grdMultiMaps.Columns[4].Visible = false;
                foreach (GridViewRow row in grdMultiMaps.Rows)
                {
                    if (row.RowType == DataControlRowType.DataRow)
                    {
                        LinkButton lb = ((LinkButton)row.FindControl("lnkRemove"));
                        if (lb != null)
                        {
                            lb.Visible = false;
                        }
                    }
                }
            }
        }
Example #2
0
        private void GetListImage(string productID, Repeater rptImg)
        {
            UploadImageBLL          bll = new UploadImageBLL();
            IList <PNK_UploadImage> lst = bll.GetList(string.Empty, productID, "1", 1, 100, out total);

            if (total > 0)
            {
                rptImg.DataSource = lst;
                rptImg.DataBind();
            }
        }
Example #3
0
        private void BindAlbum(int productId)
        {
            UploadImageBLL bll = new UploadImageBLL();

            lst = bll.GetList(string.Empty, productId.ToString(), "1", 1, 100, out total);
            //if (total > 0)
            //{
            grdImage.DataSource = lst;
            grdImage.DataBind();
            //}
        }
Example #4
0
        public static string GetVideoList(int productID)
        {
            string                  result = string.Empty;
            UploadImageBLL          bll    = new UploadImageBLL();
            IList <PNK_UploadImage> lst    = bll.GetList(string.Empty, productID.ToString(), "1", 1, 100, out total);

            if (total > 0)
            {
                result = lst[0].ImagePath;
            }
            return(result);
        }
Example #5
0
        private void GetListImage(string productID)
        {
            UploadImageBLL          bll = new UploadImageBLL();
            IList <PNK_UploadImage> lst = bll.GetList(string.Empty, productID, "1", 1, 100, out total);

            if (lst.Count > 0)
            {
                rptResult.DataSource = lst;
                rptResult.DataBind();

                ltrImgFirst.Text = string.Format(" <img  id=\"zoom_03\" src=\"{0}\" data-zoom-image=\"{0}\" />"
                                                 , WebUtils.GetUrlImage(ConfigurationManager.AppSettings["ProductUpload"], lst[0].Name));
            }
        }
Example #6
0
        private void GetList(int productId)
        {
            UploadImageBLL          bll = new UploadImageBLL();
            IList <PNK_UploadImage> lst = bll.GetList(string.Empty, productId.ToString(), "1", 1, 100, out total);

            if (total > 0)
            {
                lst = lst.Where(m => m.Name == "Youtube").ToList();
                if (lst.Count > 0)
                {
                    txtID.Value = lst[0].ImagePath;
                }
            }
        }
        private void GetListImage(string productID)
        {
            UploadImageBLL          bll = new UploadImageBLL();
            IList <PNK_UploadImage> lst = bll.GetList(string.Empty, productID, "1", 1, 100, out total);

            if (total > 0)
            {
                divSlide.Visible = true;

                rptResult.DataSource = lst.Where(m => m.Name != "Youtube");
                rptResult.DataBind();

                //Video
                IList <PNK_UploadImage> lstVideo = lst.Where(m => m.Name == "Youtube").ToList();
                if (lstVideo.Count > 0)
                {
                    hypVideo.HRef = lstVideo[0].ImagePath;
                }
            }
        }
        private void ShowConfig()
        {
            string latitude = Latitude, longitude = Longitude, companyName = CompanyName, imageName = string.Empty, address = string.Empty;

            //get list vĩ độ, kinh độ
            UploadImageBLL          bll = new UploadImageBLL();
            IList <PNK_UploadImage> lst = bll.GetList(string.Empty, ProductId, "1", type, 1, 100, out total);

            if (total > 0)
            {
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < total; i++)
                {
                    latitude    = lst[i].Latitude;
                    longitude   = lst[i].LongiTude;
                    companyName = lst[i].Name;
                    LoadGMap(latitude, longitude, companyName, address, imageName);

                    //if (i == 0)
                    //{
                    //    sb.Append("function ResetMap(mapss) {");
                    //    sb.Append(" var mapOptions = {zoom: 15,center: new google.maps.LatLng(-37.8122172,144.965374), mapTypeId: google.maps.MapTypeId.ROADMAP};");
                    //    sb.AppendFormat("mapid = '{0}';", GMap1.ClientID);
                    //    sb.Append("var map = new google.maps.Map(document.getElementById(mapid), mapOptions);");
                    //    sb.Append("var center = map.getCenter();");
                    //    sb.Append("google.maps.event.trigger(map, 'resize');");
                    //    sb.Append("map.setCenter(center);");
                    //    sb.Append(" $('#tabDetail a[href=\"#tabMaps\"]').on('click', function () {google.maps.event.trigger(map, 'resize');});");
                    //    sb.Append("google.maps.event.trigger(map, 'resize');");

                    //    sb.Append("}");
                    //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ResetMap", sb.ToString(), true);
                    //}
                }
            }
        }