Zbiór zmian 266 dla trunk

Pokaż
Ignoruj:
Data:
2009-01-30 09:41:20 (17 years ago)
Autor:
marek
Opis:

fixes #69 - dodatkowo dodano informacje jaka baza danych jest uzywana oraz linka do instrukcji

Lokalizacja:
trunk/BazaReklam
Pliki:
4 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/BazaReklam/About.Designer.cs

    r176 r266  
    3535            this.lblVersionInfo = new System.Windows.Forms.LinkLabel(); 
    3636            this.label3 = new System.Windows.Forms.Label(); 
     37            this.label4 = new System.Windows.Forms.Label(); 
     38            this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 
     39            this.lblDB = new System.Windows.Forms.Label(); 
     40            this.label5 = new System.Windows.Forms.Label(); 
    3741            this.SuspendLayout(); 
    3842            //  
    3943            // btnClose 
    4044            //  
    41             this.btnClose.Location = new System.Drawing.Point(107, 108); 
     45            this.btnClose.Location = new System.Drawing.Point(123, 135); 
     46            this.btnClose.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 
    4247            this.btnClose.Name = "btnClose"; 
    43             this.btnClose.Size = new System.Drawing.Size(80, 30); 
     48            this.btnClose.Size = new System.Drawing.Size(60, 24); 
    4449            this.btnClose.TabIndex = 0; 
    4550            this.btnClose.Text = "OK"; 
     
    5055            //  
    5156            this.label1.AutoSize = true; 
    52             this.label1.Location = new System.Drawing.Point(12, 42); 
     57            this.label1.Location = new System.Drawing.Point(9, 34); 
     58            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
    5359            this.label1.Name = "label1"; 
    54             this.label1.Size = new System.Drawing.Size(66, 17); 
     60            this.label1.Size = new System.Drawing.Size(50, 13); 
    5561            this.label1.TabIndex = 1; 
    5662            this.label1.Text = "Nr wersji:"; 
     
    5965            //  
    6066            this.lblVersion.AutoSize = true; 
    61             this.lblVersion.Location = new System.Drawing.Point(164, 42); 
     67            this.lblVersion.Location = new System.Drawing.Point(123, 34); 
     68            this.lblVersion.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
    6269            this.lblVersion.Name = "lblVersion"; 
    63             this.lblVersion.Size = new System.Drawing.Size(105, 17); 
     70            this.lblVersion.Size = new System.Drawing.Size(79, 13); 
    6471            this.lblVersion.TabIndex = 2; 
    6572            this.lblVersion.Text = "ProductVersion"; 
     
    6875            //  
    6976            this.label2.AutoSize = true; 
    70             this.label2.Location = new System.Drawing.Point(12, 70); 
     77            this.label2.Location = new System.Drawing.Point(9, 58); 
     78            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
    7179            this.label2.Name = "label2"; 
    72             this.label2.Size = new System.Drawing.Size(150, 17); 
     80            this.label2.Size = new System.Drawing.Size(114, 13); 
    7381            this.label2.TabIndex = 3; 
    7482            this.label2.Text = "Wprowadzone zmiany:"; 
     
    7886            this.lblVersionInfo.AutoSize = true; 
    7987            this.lblVersionInfo.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline; 
    80             this.lblVersionInfo.Location = new System.Drawing.Point(164, 70); 
     88            this.lblVersionInfo.Location = new System.Drawing.Point(123, 58); 
     89            this.lblVersionInfo.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
    8190            this.lblVersionInfo.Name = "lblVersionInfo"; 
    82             this.lblVersionInfo.Size = new System.Drawing.Size(54, 17); 
     91            this.lblVersionInfo.Size = new System.Drawing.Size(41, 13); 
    8392            this.lblVersionInfo.TabIndex = 5; 
    8493            this.lblVersionInfo.TabStop = true; 
     
    9099            //  
    91100            this.label3.AutoSize = true; 
    92             this.label3.Location = new System.Drawing.Point(85, 9); 
     101            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 
     102            this.label3.Location = new System.Drawing.Point(107, 7); 
     103            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
    93104            this.label3.Name = "label3"; 
    94             this.label3.Size = new System.Drawing.Size(124, 17); 
     105            this.label3.Size = new System.Drawing.Size(113, 13); 
    95106            this.label3.TabIndex = 6; 
    96107            this.label3.Text = "Informacje o wersji"; 
    97108            //  
     109            // label4 
     110            //  
     111            this.label4.AutoSize = true; 
     112            this.label4.Location = new System.Drawing.Point(9, 82); 
     113            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
     114            this.label4.Name = "label4"; 
     115            this.label4.Size = new System.Drawing.Size(56, 13); 
     116            this.label4.TabIndex = 7; 
     117            this.label4.Text = "Instrukcja:"; 
     118            //  
     119            // linkLabel1 
     120            //  
     121            this.linkLabel1.AutoSize = true; 
     122            this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline; 
     123            this.linkLabel1.Location = new System.Drawing.Point(123, 82); 
     124            this.linkLabel1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
     125            this.linkLabel1.Name = "linkLabel1"; 
     126            this.linkLabel1.Size = new System.Drawing.Size(53, 13); 
     127            this.linkLabel1.TabIndex = 8; 
     128            this.linkLabel1.TabStop = true; 
     129            this.linkLabel1.Text = "Instrukcja"; 
     130            this.linkLabel1.VisitedLinkColor = System.Drawing.Color.Blue; 
     131            this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); 
     132            //  
     133            // lblDB 
     134            //  
     135            this.lblDB.AutoSize = true; 
     136            this.lblDB.Location = new System.Drawing.Point(123, 106); 
     137            this.lblDB.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
     138            this.lblDB.Name = "lblDB"; 
     139            this.lblDB.Size = new System.Drawing.Size(183, 13); 
     140            this.lblDB.TabIndex = 9; 
     141            this.lblDB.Text = "sql.ct.com.pl/BAZA_REKLAM_TEST"; 
     142            //  
     143            // label5 
     144            //  
     145            this.label5.AutoSize = true; 
     146            this.label5.Location = new System.Drawing.Point(9, 106); 
     147            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 
     148            this.label5.Name = "label5"; 
     149            this.label5.Size = new System.Drawing.Size(72, 13); 
     150            this.label5.TabIndex = 10; 
     151            this.label5.Text = "Baza danych:"; 
     152            //  
    98153            // About 
    99154            //  
    100             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 
     155            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 
    101156            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 
    102             this.ClientSize = new System.Drawing.Size(294, 161); 
     157            this.ClientSize = new System.Drawing.Size(308, 170); 
     158            this.Controls.Add(this.label5); 
     159            this.Controls.Add(this.lblDB); 
     160            this.Controls.Add(this.linkLabel1); 
     161            this.Controls.Add(this.label4); 
    103162            this.Controls.Add(this.label3); 
    104163            this.Controls.Add(this.lblVersionInfo); 
     
    108167            this.Controls.Add(this.btnClose); 
    109168            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 
     169            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 
    110170            this.MaximizeBox = false; 
    111171            this.MinimizeBox = false; 
     
    127187        private System.Windows.Forms.LinkLabel lblVersionInfo; 
    128188        private System.Windows.Forms.Label label3; 
     189        private System.Windows.Forms.Label label4; 
     190        private System.Windows.Forms.LinkLabel linkLabel1; 
     191        private System.Windows.Forms.Label lblDB; 
     192        private System.Windows.Forms.Label label5; 
    129193 
    130194    } 
  • trunk/BazaReklam/About.cs

    r197 r266  
    11using System; 
     2using System.Data.SqlClient; 
    23using System.Windows.Forms; 
    34 
     
    1314 
    1415            lblVersion.Text = Application.ProductVersion; 
     16 
     17            SqlConnection sqlConnection = new SqlConnection(ConnString.getConnString().Value); 
     18 
     19            lblDB.Text = sqlConnection.DataSource + "/" + sqlConnection.Database; 
     20            sqlConnection.Dispose(); 
    1521        } 
    1622 
     
    2329        { 
    2430            string url = string.IsNullOrEmpty(ConfigurationManager.AppSettings["Application.Version.Url"]) 
    25                              ? "http://www.infocity.pl/baza_reklam/versioninfo.html#{0}" 
    26                              : ConfigurationManager.AppSettings["Application.Version.Url"]; 
     31                                 ? "http://www.infocity.pl/baza_reklam/versioninfo.html#{0}" 
     32                                 : ConfigurationManager.AppSettings["Application.Version.Url"]; 
    2733 
    2834            System.Diagnostics.Process.Start(string.Format(url, Application.ProductVersion)); 
    2935        } 
     36 
     37        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 
     38        { 
     39            string url = string.IsNullOrEmpty(ConfigurationManager.AppSettings["Application.Instruction.Url"]) 
     40                                 ? "http://www.infocity.pl/baza_reklam/instrukcja.htm" 
     41                                 : ConfigurationManager.AppSettings["Application.Instruction.Url"]; 
     42 
     43            System.Diagnostics.Process.Start(url); 
     44        } 
    3045    } 
    3146} 
  • trunk/BazaReklam/ZamowieniaForm.cs

    r262 r266  
    12061206        private void usunFaktureButton_Click(object sender, EventArgs e) 
    12071207        { 
    1208             if (fAKTURYBindingSource.Current != null) 
    1209             { 
    1210                 if ( 
    1211                     MessageBox.Show("Czy na pewno chcesz usun¹æ fakturê ?", 
    1212                     "", 
    1213                     MessageBoxButtons.OKCancel, 
    1214                     MessageBoxIcon.Question) 
    1215                     == DialogResult.OK) 
    1216                 { 
    1217                     Cursor = Cursors.WaitCursor; 
    1218  
    1219                     REKLAMADataSet.FAKTURYRow faktura = (REKLAMADataSet.FAKTURYRow) 
    1220                         ((DataRowView)fAKTURYBindingSource.Current).Row; 
    1221  
    1222                     if (faktura.KOREKTA) 
    1223                     { 
    1224                         int i = fAKTURYBindingSource.Find("idFakturyKorekta",faktura.ID_FAKTURY); 
    1225                         if (i > -1) 
    1226                         { 
    1227                             MessageBox.Show("Nie mo¿na usun¹æ faktury"); 
    1228                         } 
    1229                         else 
    1230                         { 
    1231                             usunKorekte(faktura); 
    1232                         } 
    1233                     } 
    1234                     else 
    1235                     { 
    1236                         if (!faktura.IsID_FK_KORNull()) 
    1237                         { 
    1238                             MessageBox.Show("Istnieje korekta. Nie mo¿na usun¹æ faktury"); 
    1239                         } 
    1240                         else 
    1241                         { 
    1242                             usunFakture(faktura); 
    1243                         } 
    1244                     } 
    1245  
    1246                     Cursor = Cursors.Default; 
    1247                 } 
    1248             } 
     1208            if (fAKTURYBindingSource.Current == null) return; 
     1209            DialogResult dialog = MessageBox.Show("Czy na pewno chcesz usun¹æ fakturê?", 
     1210                                                  "Faktura - usuwanie", 
     1211                                                  MessageBoxButtons.OKCancel, 
     1212                                                  MessageBoxIcon.Question); 
     1213 
     1214            if (dialog != DialogResult.OK) return; 
     1215 
     1216 
     1217            Cursor = Cursors.WaitCursor; 
     1218 
     1219            REKLAMADataSet.FAKTURYRow faktura = (REKLAMADataSet.FAKTURYRow)((DataRowView)fAKTURYBindingSource.Current).Row; 
     1220 
     1221            //jezeli jest korekta do tej faktury to nie mozna jej usunac 
     1222            if (!faktura.KOREKTA && !faktura.IsID_FK_KORNull()) 
     1223            { 
     1224                MessageBox.Show("Istnieje korekta. Nie mo¿na usun¹æ faktury"); 
     1225                return; 
     1226            } 
     1227 
     1228 
     1229            //jezeli jest korekta do tej korekty to nie mozna jej usunac 
     1230            if (faktura.KOREKTA && fAKTURYBindingSource.Find("idFakturyKorekta", faktura.ID_FAKTURY) > -1) 
     1231            { 
     1232                MessageBox.Show("Nie mo¿na usun¹æ faktury"); 
     1233                return; 
     1234            } 
     1235 
     1236            if (faktura.KOREKTA) 
     1237                usunKorekte(faktura); 
     1238            else 
     1239                usunFakture(faktura); 
     1240 
     1241            Cursor = Cursors.Default; 
    12491242        } 
    12501243 
     
    12981291            { 
    12991292                transaction.Rollback(); 
    1300                 throw ex; 
     1293                throw; 
    13011294            } 
    13021295            finally 
  • trunk/BazaReklam/app.config

    r226 r266  
    88  <connectionStrings> 
    99    <clear /> 
    10     <add name="BAZA_REKLAM_TEST" 
    11          connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True" 
    12          providerName="System.Data.SqlClient" /> 
    1310    <add name="BAZA_REKLAM_LOCAL" 
    1411         connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" 
     
    1613    <add name="BAZA_REKLAM"  
    1714         connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" 
     15         providerName="System.Data.SqlClient" /> 
     16    <add name="BAZA_REKLAM_TEST" 
     17         connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True" 
    1818         providerName="System.Data.SqlClient" /> 
    1919  </connectionStrings> 
     
    3939  <appSettings> 
    4040    <add key="Application.Version.Url" value="http://www.infocity.pl/baza_reklam/versioninfo.html#{0}" /> 
     41    <add key="Application.Instruction.Url" value="http://www.infocity.pl/baza_reklam/instrukcja.htm" /> 
    4142  </appSettings> 
    4243</configuration>