예제 #1
0
        public void _SetForm()
        {
            if (Code > 0)
            {
                //ArchiveCode
                DataTable Dt = WebClassLibrary.JWebDataBase.GetDataTable(@"select * from [EntPicGalleryLvl1] where Code = " + Code);
                if (Dt != null)
                {
                    if (Dt.Rows.Count > 0)
                    {
                        txtTitle.Text = Dt.Rows[0]["Name"].ToString();

                        ArchivedDocuments.JArchiveDocument archive = new ArchivedDocuments.JArchiveDocument(ArchivedDocuments.JConstantArchiveSubjects.ImagesArchiveCode.GetHashCode(), ArchivedDocuments.JConstantArchivePalces.GeneralArchive.GetHashCode());
                        archive.GetData(Convert.ToInt32(Dt.Rows[0]["ArchiveCode"].ToString()));
                        try
                        {
                            DataTable DtA = archive.Retrieve("AndroidElahiye", 123456);
                            if (DtA.Rows.Count > 0)
                            {
                                ClassLibrary.JFile image = archive._RetrieveContent(Convert.ToInt32(archive.ArchiveCode));
                                PicStr = "<img src='data:image/jpg;base64," + Convert.ToBase64String(WebClassLibrary.JDataManager.ReadToEnd(image.Stream)) + "' style='max-width:500px'/>";
                            }
                        }
                        catch { }
                    }
                }
            }
        }
예제 #2
0
 public void _SetForm()
 {
     if (Code > 0)
     {
         System.Data.DataTable Dt = WebClassLibrary.JWebDataBase.GetDataTable(@"SELECT [Code]
                                                                                     ,[ProjectName]
                                                                                     ,[Metraj]
                                                                                     ,[TedadeVahed]
                                                                                     ,[TedadKhab]
                                                                                     ,[ShomareVahed]
                                                                                     ,[Tabaghe]
                                                                                     ,[Emkanat]
                                                                                     ,[Gheymat],ArchiveCode
                                                                                 FROM [dbo].[Android_Apartments] where Code = " + Code);
         if (Dt != null)
         {
             if (Dt.Rows.Count > 0)
             {
                 txtEmkanat.Text      = Dt.Rows[0]["Emkanat"].ToString();
                 txtGheymat.Text      = Dt.Rows[0]["Gheymat"].ToString();
                 txtMetraj.Text       = Dt.Rows[0]["Metraj"].ToString();
                 txtShomareVahed.Text = Dt.Rows[0]["ShomareVahed"].ToString();
                 txtTabaghe.Text      = Dt.Rows[0]["Tabaghe"].ToString();
                 txtTedadKhab.Text    = Dt.Rows[0]["TedadKhab"].ToString();
                 txtTedadVahed.Text   = Dt.Rows[0]["TedadeVahed"].ToString();
                 txtTitle.Text        = Dt.Rows[0]["ProjectName"].ToString();
                 ArchivedDocuments.JArchiveDocument archive = new ArchivedDocuments.JArchiveDocument(ArchivedDocuments.JConstantArchiveSubjects.ImagesArchiveCode.GetHashCode(), ArchivedDocuments.JConstantArchivePalces.GeneralArchive.GetHashCode());
                 archive.GetData(Convert.ToInt32(Dt.Rows[0]["ArchiveCode"].ToString()));
                 try
                 {
                     System.Data.DataTable DtA = archive.Retrieve("AndroidElahiye", 123456);
                     if (DtA.Rows.Count > 0)
                     {
                         ClassLibrary.JFile image = archive._RetrieveContent(Convert.ToInt32(archive.ArchiveCode));
                         PicStr = "<img src='data:image/jpg;base64," + Convert.ToBase64String(WebClassLibrary.JDataManager.ReadToEnd(image.Stream)) + "' style='max-width:500px'/>";
                     }
                 }
                 catch { }
             }
         }
     }
 }
예제 #3
0
 public void _SetForm()
 {
     if (Code > 0)
     {
         Entertainment.JAboutUs AboutUs = new Entertainment.JAboutUs();
         AboutUs.GetData(Code);
         txtText.Text = AboutUs.Text;
         ArchivedDocuments.JArchiveDocument archive = new ArchivedDocuments.JArchiveDocument(ArchivedDocuments.JConstantArchiveSubjects.ImagesArchiveCode.GetHashCode(), ArchivedDocuments.JConstantArchivePalces.GeneralArchive.GetHashCode());
         archive.GetData(AboutUs.ArchiveCode);
         try
         {
             DataTable Dt = archive.Retrieve("AndroidElahiye", 123456);
             if (Dt.Rows.Count > 0)
             {
                 ClassLibrary.JFile image = archive._RetrieveContent(Convert.ToInt32(archive.ArchiveCode));
                 PicStr = "<img src='data:image/jpg;base64," + Convert.ToBase64String(WebClassLibrary.JDataManager.ReadToEnd(image.Stream)) + "' style='max-width:500px'/>";
             }
         }
         catch { }
     }
 }