private void FillImage(int LeadId, int LeadImageId)
        {
            LeadsImage img = LeadsUploadManager.getLeadsImageByLeadID(LeadId).Where(x => x.LeadImageId == LeadImageId).SingleOrDefault();

            if (img != null)
            {
                txtLocation.Text    = img.Location;
                txtDescription.Text = img.Description;
                string imageName = img.ImageName == String.Empty ? "../../Images/no.jpg" : "../../LeadsImage/" + Convert.ToString(img.LeadId) + "/" + Convert.ToString(img.LeadImageId) + "/" + Convert.ToString(img.ImageName);
                myimage.ImageUrl = imageName;
            }
            else
            {
            }
        }
Пример #2
0
        static protected void exportPhotos(LeadPolicy policy)
        {
            int    leadID            = (int)policy.LeadId;
            int    policyTypeID      = (int)policy.PolicyType;
            string policyDescription = policy.LeadPolicyType != null ? policy.LeadPolicyType.Description : "";

            List <LeadsImage> images = LeadsUploadManager.getLeadsImageByLeadID(leadID, policyTypeID);


            if (images == null || images.Count == 0)
            {
                return;
            }


            addPhotos(images, policyDescription);
        }
Пример #3
0
        private void FillImage(int LeadId)
        {
            int policyTypeID = Convert.ToInt32(ViewState["policyTypeID"]);

            if (policyTypeID > 0)
            {
                List <LeadsImage> img = LeadsUploadManager.getLeadsImageByLeadID(LeadId, policyTypeID);
                if (img != null && img.Count > 0)
                {
                    adsource.DataSource       = img;
                    ViewState["ls"]           = adsource.PageCount - 1;
                    adsource.CurrentPageIndex = pos;
                    ViewState["pageIndex"]    = pos;
                    lblPageCount.Text         = "Page " + (pos + 1) + " of " + adsource.PageCount;


                    btnfirst.Enabled    = !adsource.IsFirstPage;
                    btnprevious.Enabled = !adsource.IsFirstPage;
                    btnlast.Enabled     = !adsource.IsLastPage;
                    btnnext.Enabled     = !adsource.IsLastPage;
                    t1.Visible          = true;
                    dtlist.DataSource   = adsource;
                    dtlist.DataBind();
                }
                else
                {
                    // divImage.Visible = false;
                    dtlist.DataSource = img;
                    dtlist.DataBind();
                    t1.Visible = false;
                }
            }
            else
            {
                dtlist.DataSource = null;
                dtlist.DataBind();
                t1.Visible = false;
            }
        }