- Data:
- 2009-01-30 09:41:20 (17 years ago)
- Lokalizacja:
- trunk/BazaReklam
- Pliki:
-
- 4 zmodyfikowane
-
About.Designer.cs (zmodyfikowane) (8 diffs)
-
About.cs (zmodyfikowane) (3 diffs)
-
ZamowieniaForm.cs (zmodyfikowane) (2 diffs)
-
app.config (zmodyfikowane) (3 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/BazaReklam/About.Designer.cs
r176 r266 35 35 this.lblVersionInfo = new System.Windows.Forms.LinkLabel(); 36 36 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(); 37 41 this.SuspendLayout(); 38 42 // 39 43 // btnClose 40 44 // 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); 42 47 this.btnClose.Name = "btnClose"; 43 this.btnClose.Size = new System.Drawing.Size( 80, 30);48 this.btnClose.Size = new System.Drawing.Size(60, 24); 44 49 this.btnClose.TabIndex = 0; 45 50 this.btnClose.Text = "OK"; … … 50 55 // 51 56 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); 53 59 this.label1.Name = "label1"; 54 this.label1.Size = new System.Drawing.Size( 66, 17);60 this.label1.Size = new System.Drawing.Size(50, 13); 55 61 this.label1.TabIndex = 1; 56 62 this.label1.Text = "Nr wersji:"; … … 59 65 // 60 66 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); 62 69 this.lblVersion.Name = "lblVersion"; 63 this.lblVersion.Size = new System.Drawing.Size( 105, 17);70 this.lblVersion.Size = new System.Drawing.Size(79, 13); 64 71 this.lblVersion.TabIndex = 2; 65 72 this.lblVersion.Text = "ProductVersion"; … … 68 75 // 69 76 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); 71 79 this.label2.Name = "label2"; 72 this.label2.Size = new System.Drawing.Size(1 50, 17);80 this.label2.Size = new System.Drawing.Size(114, 13); 73 81 this.label2.TabIndex = 3; 74 82 this.label2.Text = "Wprowadzone zmiany:"; … … 78 86 this.lblVersionInfo.AutoSize = true; 79 87 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); 81 90 this.lblVersionInfo.Name = "lblVersionInfo"; 82 this.lblVersionInfo.Size = new System.Drawing.Size( 54, 17);91 this.lblVersionInfo.Size = new System.Drawing.Size(41, 13); 83 92 this.lblVersionInfo.TabIndex = 5; 84 93 this.lblVersionInfo.TabStop = true; … … 90 99 // 91 100 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); 93 104 this.label3.Name = "label3"; 94 this.label3.Size = new System.Drawing.Size(1 24, 17);105 this.label3.Size = new System.Drawing.Size(113, 13); 95 106 this.label3.TabIndex = 6; 96 107 this.label3.Text = "Informacje o wersji"; 97 108 // 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 // 98 153 // About 99 154 // 100 this.AutoScaleDimensions = new System.Drawing.SizeF( 8F, 16F);155 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 101 156 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); 103 162 this.Controls.Add(this.label3); 104 163 this.Controls.Add(this.lblVersionInfo); … … 108 167 this.Controls.Add(this.btnClose); 109 168 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 169 this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); 110 170 this.MaximizeBox = false; 111 171 this.MinimizeBox = false; … … 127 187 private System.Windows.Forms.LinkLabel lblVersionInfo; 128 188 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; 129 193 130 194 } -
trunk/BazaReklam/About.cs
r197 r266 1 1 using System; 2 using System.Data.SqlClient; 2 3 using System.Windows.Forms; 3 4 … … 13 14 14 15 lblVersion.Text = Application.ProductVersion; 16 17 SqlConnection sqlConnection = new SqlConnection(ConnString.getConnString().Value); 18 19 lblDB.Text = sqlConnection.DataSource + "/" + sqlConnection.Database; 20 sqlConnection.Dispose(); 15 21 } 16 22 … … 23 29 { 24 30 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"]; 27 33 28 34 System.Diagnostics.Process.Start(string.Format(url, Application.ProductVersion)); 29 35 } 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 } 30 45 } 31 46 } -
trunk/BazaReklam/ZamowieniaForm.cs
r262 r266 1206 1206 private void usunFaktureButton_Click(object sender, EventArgs e) 1207 1207 { 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; 1249 1242 } 1250 1243 … … 1298 1291 { 1299 1292 transaction.Rollback(); 1300 throw ex;1293 throw; 1301 1294 } 1302 1295 finally -
trunk/BazaReklam/app.config
r226 r266 8 8 <connectionStrings> 9 9 <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" />13 10 <add name="BAZA_REKLAM_LOCAL" 14 11 connectionString="Data Source=10.0.0.21;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" … … 16 13 <add name="BAZA_REKLAM" 17 14 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" 18 18 providerName="System.Data.SqlClient" /> 19 19 </connectionStrings> … … 39 39 <appSettings> 40 40 <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" /> 41 42 </appSettings> 42 43 </configuration>
