- Data:
- 2009-06-12 18:23:17 (17 years ago)
- Lokalizacja:
- branches/Abonament/BazaReklam
- Pliki:
-
- 6 dodane
- 14 zmodyfikowane
- 3 przeniesione
-
Baza Reklam.csproj (zmodyfikowane) (5 diffs)
-
Classes/Helpers/ValidationHelper.cs (zmodyfikowane) (1 diff)
-
Classes/Interfaces/IProduct.cs (dodane)
-
Classes/Model/Customer.cs (zmodyfikowane) (3 diffs)
-
Classes/Model/Product.cs (dodane)
-
Classes/Model/Subscription.cs (dodane)
-
Classes/Model/SubscriptionDetail.cs (dodane)
-
Classes/Model/SubscriptionType.cs (dodane)
-
Classes/Repositories/CustomerRepository.cs (zmodyfikowane) (3 diffs)
-
Classes/Repositories/IRepository.cs (zmodyfikowane) (1 diff)
-
Classes/Repositories/Repository.cs (zmodyfikowane) (2 diffs)
-
Classes/Repositories/SubscriptionTypeRepository.cs (dodane)
-
ClientsForm.Designer.cs (zmodyfikowane) (8 diffs)
-
ClientsForm.cs (zmodyfikowane) (6 diffs)
-
ClientsForm.resx (zmodyfikowane) (4 diffs)
-
Raporty/faktura.xml (zmodyfikowane) (1 diff)
-
SubscriptionForm.Designer.cs (przeniesione) (przeniesione from branches/Abonament/BazaReklam/Subscription.Designer.cs) (9 diffs)
-
SubscriptionForm.cs (przeniesione) (przeniesione from branches/Abonament/BazaReklam/Subscription.cs) (2 diffs)
-
SubscriptionForm.resx (przeniesione) (przeniesione from branches/Abonament/BazaReklam/Subscription.resx) (1 diff)
-
ZamowieniaForm.Designer.cs (zmodyfikowane) (15 diffs)
-
ZamowieniaForm.cs (zmodyfikowane) (2 diffs)
-
ZamowieniaForm.resx (zmodyfikowane) (7 diffs)
-
app.config (zmodyfikowane) (1 diff)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
branches/Abonament/BazaReklam/Baza Reklam.csproj
r702 r703 141 141 <Compile Include="Classes\Interfaces\IInvoiceProvider.cs" /> 142 142 <Compile Include="Classes\Interfaces\IForm.cs" /> 143 <Compile Include="Classes\Interfaces\IProduct.cs" /> 144 <Compile Include="Classes\Model\Product.cs" /> 143 145 <Compile Include="Classes\Model\Agent.cs" /> 144 146 <Compile Include="Classes\Model\Country.cs" /> … … 151 153 <Compile Include="Classes\Logger.cs" /> 152 154 <Compile Include="Classes\Model\State.cs" /> 155 <Compile Include="Classes\Model\Subscription.cs" /> 156 <Compile Include="Classes\Model\SubscriptionDetail.cs" /> 157 <Compile Include="Classes\Model\SubscriptionType.cs" /> 153 158 <Compile Include="Classes\Model\UserAgency.cs" /> 154 159 <Compile Include="Classes\PrintDGV.cs" /> … … 161 166 <Compile Include="Classes\Repositories\Repository.cs" /> 162 167 <Compile Include="Classes\Repositories\StateRepository.cs" /> 168 <Compile Include="Classes\Repositories\SubscriptionTypeRepository.cs" /> 163 169 <Compile Include="Classes\Repositories\UserAgencyRepository.cs" /> 164 170 <Compile Include="Classes\User.cs" /> … … 206 212 <DependentUpon>FacturesFormNew.cs</DependentUpon> 207 213 </Compile> 208 <Compile Include="Subscription .cs">209 <SubType>Form</SubType> 210 </Compile> 211 <Compile Include="Subscription .Designer.cs">212 <DependentUpon>Subscription .cs</DependentUpon>214 <Compile Include="SubscriptionForm.cs"> 215 <SubType>Form</SubType> 216 </Compile> 217 <Compile Include="SubscriptionForm.Designer.cs"> 218 <DependentUpon>SubscriptionForm.cs</DependentUpon> 213 219 </Compile> 214 220 <Compile Include="ZestawienieZamowienForm.cs"> … … 609 615 <EmbeddedResource Include="Raporty\fakturaKatowicePoznan.rdlc" /> 610 616 <EmbeddedResource Include="Raporty\fakturaKorekta.rdlc" /> 611 <EmbeddedResource Include="Subscription .resx">612 <SubType>Designer</SubType> 613 <DependentUpon>Subscription .cs</DependentUpon>617 <EmbeddedResource Include="SubscriptionForm.resx"> 618 <SubType>Designer</SubType> 619 <DependentUpon>SubscriptionForm.cs</DependentUpon> 614 620 </EmbeddedResource> 615 621 <EmbeddedResource Include="ZestawienieZamowienForm.resx"> -
branches/Abonament/BazaReklam/Classes/Helpers/ValidationHelper.cs
r539 r703 78 78 return cancelEventArgs.Cancel; 79 79 } 80 81 public static bool IsComboValueSelected(ComboBox comboBox, int defaultIndex, string errorMessage, CancelEventArgs cancelEventArgs, ErrorProvider errorProvider) 82 { 83 StringBuilder sb = new StringBuilder(); 84 if (comboBox.SelectedIndex < 0 || comboBox.SelectedIndex == defaultIndex || comboBox.SelectedItem == null) 85 { 86 cancelEventArgs.Cancel = true; 87 sb.Append(errorMessage); 88 } 89 else 90 cancelEventArgs.Cancel = false; 91 92 errorProvider.SetError(comboBox, sb.ToString()); 93 return cancelEventArgs.Cancel; 94 } 80 95 } 81 96 } -
branches/Abonament/BazaReklam/Classes/Model/Customer.cs
r702 r703 1 using System.Collections.Generic; 2 1 3 namespace Baza_Reklam.Classes.Model 2 4 { … … 5 7 private readonly int _id; 6 8 private readonly string _name; 9 private List<Subscription> _subscriptions; 7 10 8 11 public Customer(int id, string name) … … 21 24 get { return _name; } 22 25 } 26 27 public List<Subscription> Subscriptions 28 { 29 get { return _subscriptions; } 30 } 31 32 public void AddSubscription(Subscription subscription) 33 { 34 if (_subscriptions == null) 35 _subscriptions = new List<Subscription>(); 36 37 _subscriptions.Add(subscription); 38 } 23 39 } 24 40 } -
branches/Abonament/BazaReklam/Classes/Repositories/CustomerRepository.cs
r702 r703 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Data; 3 4 using System.Data.SqlClient; 4 using System.Text;5 using Baza_Reklam.Classes.Interfaces; 5 6 using Baza_Reklam.Classes.Model; 6 7 … … 16 17 public override Customer Find(int id) 17 18 { 18 string query = "SELECT *FROM Klienci WHERE CustomerId={0}";19 string query = "SELECT CustomerId, FirstName FROM Klienci WHERE CustomerId={0}"; 19 20 query = string.Format(query, id); 20 21 … … 30 31 finally 31 32 { 32 _connection.Close();33 CleanUp(); 33 34 } 34 35 35 36 return null; 36 37 } 38 39 public override void Save(Customer customer) 40 { 41 const string insertSubscriptionQuery = "INSERT INTO Subscription(Guid, CustomerId, SubscriptionTypeId, SubscriptionItems, BasePrice, TotalPrice, Discount, Currency, OrderId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy, StartDate) " 42 + "VALUES(@guid, @customerId, @subscriptionTypeId, @subscriptionItems, @basePrice, @totalPrice, @discount, @currency, @orderId, @createdOn, @createdBy, @updatedOn, @updatedBy, @startDate) " 43 + "SELECT SCOPE_IDENTITY();"; 44 45 const string insertSubscriptionDetailQuery = "INSERT INTO SubscriptionDetail(SubscriptionId, Price, PricePln, Vat, [Year], [Month]) " 46 + "VALUES(@subscriptionId, @price, @pricePln, @vat, @year, @month) " 47 + "SELECT SCOPE_IDENTITY();"; 48 49 try 50 { 51 _connection.Open(); 52 _transaction = _connection.BeginTransaction(); 53 _command = new SqlCommand(insertSubscriptionQuery, _connection); 54 _command.Transaction = _transaction; 55 56 foreach (Subscription subscription in customer.Subscriptions) 57 { 58 _command.Parameters.Clear(); 59 60 _command.Parameters.AddWithValue("@guid", subscription.Guid); 61 _command.Parameters.AddWithValue("@customerId", customer.Id); 62 _command.Parameters.AddWithValue("@subscriptionTypeId", subscription.SubscriptionTypeId); 63 _command.Parameters.AddWithValue("@subscriptionItems", subscription.SubscriptionItems); 64 _command.Parameters.AddWithValue("@basePrice", subscription.BasePrice); 65 _command.Parameters.AddWithValue("@totalPrice", subscription.TotalPrice); 66 _command.Parameters.AddWithValue("@discount", subscription.Discount); 67 _command.Parameters.AddWithValue("@currency", subscription.Currency); 68 if (subscription.OrderId > 0) 69 _command.Parameters.AddWithValue("@orderId", subscription.OrderId); 70 else 71 _command.Parameters.AddWithValue("@orderId", DBNull.Value); 72 73 _command.Parameters.AddWithValue("@createdOn", subscription.CreatedOn); 74 _command.Parameters.AddWithValue("@createdBy", subscription.CreatedBy); 75 _command.Parameters.AddWithValue("@updatedOn", subscription.UpdatedOn); 76 _command.Parameters.AddWithValue("@updatedBy", subscription.UpdatedBy); 77 _command.Parameters.AddWithValue("@startDate", subscription.StartDate); 78 79 int subscriptionId = Convert.ToInt32(_command.ExecuteScalar()); 80 81 foreach (SubscriptionDetail subscriptionDetail in subscription.SubscriptionDetails) 82 { 83 subscriptionDetail.SubscriptionId = subscriptionId; 84 85 SqlCommand sqlCommand = new SqlCommand(insertSubscriptionDetailQuery, _connection); 86 sqlCommand.Transaction = _transaction; 87 sqlCommand.Parameters.AddWithValue("@subscriptionId", subscriptionDetail.SubscriptionId); 88 sqlCommand.Parameters.AddWithValue("@price", subscriptionDetail.Price); 89 sqlCommand.Parameters.AddWithValue("@pricePln", subscriptionDetail.PricePln); 90 sqlCommand.Parameters.AddWithValue("@vat", subscriptionDetail.Vat); 91 sqlCommand.Parameters.AddWithValue("@year", subscriptionDetail.Year); 92 sqlCommand.Parameters.AddWithValue("@month", subscriptionDetail.Month); 93 94 sqlCommand.ExecuteScalar(); 95 } 96 } 97 98 _transaction.Commit(); 99 } 100 catch (Exception) 101 { 102 _transaction.Rollback(); 103 throw; 104 } 105 finally 106 { 107 CleanUp(); 108 } 109 } 110 111 public List<Subscription> FindSubscriptions(int customerId) 112 { 113 string query = "SELECT Id, Guid, CustomerId, SubscriptionTypeId, SubscriptionItems, BasePrice, Discount, TotalPrice, Currency, OrderId, CreatedOn, CreatedBy, UpdatedOn, UpdatedBy, StartDate FROM Subscription WHERE CustomerId={0} ORDER BY UpdatedOn DESC"; 114 query = string.Format(query, customerId); 115 116 List<Subscription> subscriptions = new List<Subscription>(); 117 118 try 119 { 120 _connection.Open(); 121 _command = new SqlCommand(query, _connection); 122 123 _reader = _command.ExecuteReader(); 124 if (_reader != null) 125 { 126 while (_reader.Read()) 127 { 128 Subscription subscription = new Subscription(_reader.GetInt32(0)); 129 subscription.Guid = _reader.GetGuid(1); 130 subscription.CustomerId = _reader.GetInt32(2); 131 subscription.SubscriptionTypeId = _reader.GetInt32(3); 132 subscription.SubscriptionItems = _reader.GetInt32(4); 133 subscription.BasePrice = _reader.GetDecimal(5); 134 subscription.Discount = _reader.GetDecimal(6); 135 subscription.TotalPrice = _reader.GetDecimal(7); 136 subscription.Currency = _reader.GetString(8); 137 if (_reader[9] != DBNull.Value) 138 subscription.OrderId = _reader.GetInt32(9); 139 subscription.CreatedOn = _reader.GetDateTime(10); 140 subscription.CreatedBy = _reader.GetInt32(11); 141 subscription.UpdatedOn = _reader.GetDateTime(12); 142 subscription.UpdatedBy = _reader.GetInt32(13); 143 subscription.StartDate = _reader.GetDateTime(14); 144 145 subscriptions.Add(subscription); 146 } 147 } 148 } 149 finally 150 { 151 CleanUp(); 152 } 153 154 return subscriptions; 155 } 156 157 public List<IProduct> FindProductsWithoutOrders(int customerId) 158 { 159 160 List<IProduct> products = new List<IProduct>(); 161 162 const string query = "sp_GetProductsWithoutOrder"; 163 164 try 165 { 166 _connection.Open(); 167 _command = new SqlCommand(query, _connection); 168 _command.Parameters.AddWithValue("@customerId", customerId); 169 _command.CommandType = CommandType.StoredProcedure; 170 171 _reader = _command.ExecuteReader(); 172 if (_reader != null) 173 { 174 while (_reader.Read()) 175 { 176 Product product = new Product(); 177 product.Id = _reader.GetInt32(0); 178 product.Type = _reader.GetString(1); 179 product.ShortName = _reader.GetString(2); 180 product.StartDate = _reader.GetDateTime(3); 181 product.Price = _reader.GetDecimal(4); 182 product.TotalPrice = _reader.GetDecimal(5); 183 product.Vat = _reader.GetDecimal(6); 184 product.Currency = _reader.GetString(7); 185 product.IsActivated = _reader.GetBoolean(8); 186 187 products.Add(product); 188 } 189 } 190 } 191 finally 192 { 193 CleanUp(); 194 } 195 196 return products; 197 } 37 198 } 38 199 } -
branches/Abonament/BazaReklam/Classes/Repositories/IRepository.cs
r614 r703 7 7 T Find(int id); 8 8 List<T> FindAll(); 9 void Save( );10 void Delete( );9 void Save(T entity); 10 void Delete(T entity); 11 11 } 12 12 } -
branches/Abonament/BazaReklam/Classes/Repositories/Repository.cs
r702 r703 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Data; 3 4 using System.Data.SqlClient; 4 5 5 6 namespace Baza_Reklam.Classes.Repositories 6 7 { 7 public class Repository<T> : IRepository<T> 8 public class Repository<T> : IRepository<T>, IDisposable 8 9 { 9 10 protected SqlConnection _connection; … … 27 28 } 28 29 29 public virtual void Save( )30 public virtual void Save(T entity) 30 31 { 31 32 throw new NotImplementedException(); 32 33 } 33 34 34 public virtual void Delete( )35 public virtual void Delete(T entity) 35 36 { 36 37 throw new NotImplementedException(); 37 38 } 38 }39 39 40 public class SqlRepository<T> : Repository<T> 41 { 42 public SqlRepository(string connectionString) : base(connectionString) 40 public void Dispose() 43 41 { 42 if (_connection == null) return; 43 44 if (_connection.State == ConnectionState.Open) 45 _connection.Close(); 46 47 _connection.Dispose(); 48 } 49 50 protected void CleanUp() 51 { 52 if (_reader != null) _reader.Close(); 53 54 if (_command != null) _command.Dispose(); 55 56 if (_connection != null && _connection.State == ConnectionState.Open) 57 _connection.Close(); 44 58 } 45 59 } -
branches/Abonament/BazaReklam/ClientsForm.Designer.cs
r699 r703 242 242 this.vIEWKOREKTYBindingSource = new System.Windows.Forms.BindingSource(this.components); 243 243 this.btnKorekta = new System.Windows.Forms.Button(); 244 this.tabAbonamenty = new System.Windows.Forms.TabPage(); 245 this.btnAddSubscription = new System.Windows.Forms.Button(); 246 this.gridSubscriptions = new System.Windows.Forms.DataGridView(); 244 247 this.klasyfikacjaTabPage = new System.Windows.Forms.TabPage(); 245 248 this.usunKlButton = new System.Windows.Forms.Button(); … … 564 567 this.agenciExpoTableAdapter = new Baza_Reklam.SLOWNIKDataSetTableAdapters.AGENCITableAdapter(); 565 568 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 569 this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); 570 this.Guid = new System.Windows.Forms.DataGridViewTextBoxColumn(); 571 this.CustomerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); 572 this.SubscriptionTypeId = new System.Windows.Forms.DataGridViewTextBoxColumn(); 573 this.TotalPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); 574 this.Currency = new System.Windows.Forms.DataGridViewTextBoxColumn(); 575 this.OrderId = new System.Windows.Forms.DataGridViewTextBoxColumn(); 576 this.CreatedOn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 577 this.CreatedBy = new System.Windows.Forms.DataGridViewTextBoxColumn(); 578 this.UpdatedOn = new System.Windows.Forms.DataGridViewTextBoxColumn(); 579 this.UpdatedBy = new System.Windows.Forms.DataGridViewTextBoxColumn(); 580 this.StartDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); 566 581 modify_UserLabel = new System.Windows.Forms.Label(); 567 582 last_ModifyLabel = new System.Windows.Forms.Label(); … … 624 639 ((System.ComponentModel.ISupportInitialize)(this.gridKorekty)).BeginInit(); 625 640 ((System.ComponentModel.ISupportInitialize)(this.vIEWKOREKTYBindingSource)).BeginInit(); 641 this.tabAbonamenty.SuspendLayout(); 642 ((System.ComponentModel.ISupportInitialize)(this.gridSubscriptions)).BeginInit(); 626 643 this.klasyfikacjaTabPage.SuspendLayout(); 627 644 ((System.ComponentModel.ISupportInitialize)(this.klasyfikacjaDataGridView)).BeginInit(); … … 950 967 this.tabs.Controls.Add(this.fakturyTab); 951 968 this.tabs.Controls.Add(this.tabKorekty); 969 this.tabs.Controls.Add(this.tabAbonamenty); 952 970 this.tabs.Controls.Add(this.klasyfikacjaTabPage); 953 971 this.tabs.Controls.Add(this.kontaktyTabPage); … … 2747 2765 this.btnKorekta.Click += new System.EventHandler(this.btnKorekta_Click); 2748 2766 // 2767 // tabAbonamenty 2768 // 2769 this.tabAbonamenty.Controls.Add(this.btnAddSubscription); 2770 this.tabAbonamenty.Controls.Add(this.gridSubscriptions); 2771 this.tabAbonamenty.Location = new System.Drawing.Point(4, 22); 2772 this.tabAbonamenty.Name = "tabAbonamenty"; 2773 this.tabAbonamenty.Padding = new System.Windows.Forms.Padding(3); 2774 this.tabAbonamenty.Size = new System.Drawing.Size(955, 351); 2775 this.tabAbonamenty.TabIndex = 9; 2776 this.tabAbonamenty.Text = "Abonamenty"; 2777 this.tabAbonamenty.UseVisualStyleBackColor = true; 2778 // 2779 // btnAddSubscription 2780 // 2781 this.btnAddSubscription.Location = new System.Drawing.Point(751, 9); 2782 this.btnAddSubscription.Name = "btnAddSubscription"; 2783 this.btnAddSubscription.Size = new System.Drawing.Size(101, 23); 2784 this.btnAddSubscription.TabIndex = 1; 2785 this.btnAddSubscription.Text = "Dodaj abonament"; 2786 this.btnAddSubscription.UseVisualStyleBackColor = true; 2787 this.btnAddSubscription.Click += new System.EventHandler(this.btnAddSubscription_Click); 2788 // 2789 // gridSubscriptions 2790 // 2791 this.gridSubscriptions.AllowUserToAddRows = false; 2792 this.gridSubscriptions.AllowUserToDeleteRows = false; 2793 this.gridSubscriptions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 2794 this.gridSubscriptions.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 2795 this.Id, 2796 this.Guid, 2797 this.CustomerId, 2798 this.SubscriptionTypeId, 2799 this.TotalPrice, 2800 this.Currency, 2801 this.OrderId, 2802 this.CreatedOn, 2803 this.CreatedBy, 2804 this.UpdatedOn, 2805 this.UpdatedBy, 2806 this.StartDate}); 2807 this.gridSubscriptions.Location = new System.Drawing.Point(0, 0); 2808 this.gridSubscriptions.Name = "gridSubscriptions"; 2809 this.gridSubscriptions.ReadOnly = true; 2810 this.gridSubscriptions.Size = new System.Drawing.Size(738, 345); 2811 this.gridSubscriptions.TabIndex = 0; 2812 // 2749 2813 // klasyfikacjaTabPage 2750 2814 // … … 6258 6322 this.errorProvider.ContainerControl = this; 6259 6323 // 6324 // Id 6325 // 6326 this.Id.HeaderText = "Id"; 6327 this.Id.Name = "Id"; 6328 this.Id.ReadOnly = true; 6329 this.Id.Visible = false; 6330 // 6331 // Guid 6332 // 6333 this.Guid.HeaderText = "Guid"; 6334 this.Guid.Name = "Guid"; 6335 this.Guid.ReadOnly = true; 6336 this.Guid.Visible = false; 6337 // 6338 // CustomerId 6339 // 6340 this.CustomerId.HeaderText = "CustomerId"; 6341 this.CustomerId.Name = "CustomerId"; 6342 this.CustomerId.ReadOnly = true; 6343 this.CustomerId.Visible = false; 6344 // 6345 // SubscriptionTypeId 6346 // 6347 this.SubscriptionTypeId.HeaderText = "SubscriptionTypeId"; 6348 this.SubscriptionTypeId.Name = "SubscriptionTypeId"; 6349 this.SubscriptionTypeId.ReadOnly = true; 6350 this.SubscriptionTypeId.Visible = false; 6351 // 6352 // TotalPrice 6353 // 6354 this.TotalPrice.DataPropertyName = "TotalPrice"; 6355 this.TotalPrice.HeaderText = "Cena ca³kowita"; 6356 this.TotalPrice.Name = "TotalPrice"; 6357 this.TotalPrice.ReadOnly = true; 6358 // 6359 // Currency 6360 // 6361 this.Currency.DataPropertyName = "Currency"; 6362 this.Currency.HeaderText = "Waluta"; 6363 this.Currency.Name = "Currency"; 6364 this.Currency.ReadOnly = true; 6365 // 6366 // OrderId 6367 // 6368 this.OrderId.HeaderText = "OrderId"; 6369 this.OrderId.Name = "OrderId"; 6370 this.OrderId.ReadOnly = true; 6371 this.OrderId.Visible = false; 6372 // 6373 // CreatedOn 6374 // 6375 this.CreatedOn.DataPropertyName = "CreatedOn"; 6376 this.CreatedOn.HeaderText = "Utworzono"; 6377 this.CreatedOn.Name = "CreatedOn"; 6378 this.CreatedOn.ReadOnly = true; 6379 // 6380 // CreatedBy 6381 // 6382 this.CreatedBy.DataPropertyName = "CreatedBy"; 6383 this.CreatedBy.HeaderText = "CreatedBy"; 6384 this.CreatedBy.Name = "CreatedBy"; 6385 this.CreatedBy.ReadOnly = true; 6386 this.CreatedBy.Visible = false; 6387 // 6388 // UpdatedOn 6389 // 6390 this.UpdatedOn.DataPropertyName = "UpdatedOn"; 6391 this.UpdatedOn.HeaderText = "Modyfikowano"; 6392 this.UpdatedOn.Name = "UpdatedOn"; 6393 this.UpdatedOn.ReadOnly = true; 6394 // 6395 // UpdatedBy 6396 // 6397 this.UpdatedBy.HeaderText = "UpdatedBy"; 6398 this.UpdatedBy.Name = "UpdatedBy"; 6399 this.UpdatedBy.ReadOnly = true; 6400 this.UpdatedBy.Visible = false; 6401 // 6402 // StartDate 6403 // 6404 this.StartDate.DataPropertyName = "StartDate"; 6405 this.StartDate.HeaderText = "Data od"; 6406 this.StartDate.Name = "StartDate"; 6407 this.StartDate.ReadOnly = true; 6408 // 6260 6409 // ClientsForm 6261 6410 // … … 6319 6468 ((System.ComponentModel.ISupportInitialize)(this.gridKorekty)).EndInit(); 6320 6469 ((System.ComponentModel.ISupportInitialize)(this.vIEWKOREKTYBindingSource)).EndInit(); 6470 this.tabAbonamenty.ResumeLayout(false); 6471 ((System.ComponentModel.ISupportInitialize)(this.gridSubscriptions)).EndInit(); 6321 6472 this.klasyfikacjaTabPage.ResumeLayout(false); 6322 6473 this.klasyfikacjaTabPage.PerformLayout(); … … 6892 7043 private System.Windows.Forms.DataGridViewTextBoxColumn data; 6893 7044 private System.Windows.Forms.DataGridViewCheckBoxColumn Aktywny; 7045 private System.Windows.Forms.TabPage tabAbonamenty; 7046 private System.Windows.Forms.Button btnAddSubscription; 7047 private System.Windows.Forms.DataGridView gridSubscriptions; 7048 private System.Windows.Forms.DataGridViewTextBoxColumn Price; 7049 private System.Windows.Forms.DataGridViewTextBoxColumn Id; 7050 private System.Windows.Forms.DataGridViewTextBoxColumn Guid; 7051 private System.Windows.Forms.DataGridViewTextBoxColumn CustomerId; 7052 private System.Windows.Forms.DataGridViewTextBoxColumn SubscriptionTypeId; 7053 private System.Windows.Forms.DataGridViewTextBoxColumn TotalPrice; 7054 private System.Windows.Forms.DataGridViewTextBoxColumn Currency; 7055 private System.Windows.Forms.DataGridViewTextBoxColumn OrderId; 7056 private System.Windows.Forms.DataGridViewTextBoxColumn CreatedOn; 7057 private System.Windows.Forms.DataGridViewTextBoxColumn CreatedBy; 7058 private System.Windows.Forms.DataGridViewTextBoxColumn UpdatedOn; 7059 private System.Windows.Forms.DataGridViewTextBoxColumn UpdatedBy; 7060 private System.Windows.Forms.DataGridViewTextBoxColumn StartDate; 6894 7061 } 6895 7062 } -
branches/Abonament/BazaReklam/ClientsForm.cs
r676 r703 1 1 using System; 2 using System.Collections.Generic; 2 3 using System.ComponentModel; 3 4 using System.Data; … … 9 10 using Baza_Reklam.Classes.Helpers; 10 11 using Baza_Reklam.Classes.Interfaces; 12 using Baza_Reklam.Classes.Model; 13 using Baza_Reklam.Classes.Repositories; 11 14 12 15 namespace Baza_Reklam … … 158 161 gridKorekty.Refresh(); 159 162 break; 163 case "tabAbonamenty": 164 RefreshSubscriptions(); 165 break; 160 166 case "klasyfikacjaTabPage": 161 167 rEKLAMADataSet.KL_KLIENCI.Clear(); … … 197 203 } 198 204 } 205 199 206 200 207 private void tabControl2_SelectedIndexChanged(object sender, EventArgs e) … … 245 252 vIEW_KOREKTYTableAdapter.FillByCustomerId(rEKLAMADataSet.VIEW_KOREKTY, customerId); 246 253 gridKorekty.Refresh(); 254 break; 255 case "tabAbonamenty": 256 RefreshSubscriptions(); 247 257 break; 248 258 case "klasyfikacjaTabPage": … … 2434 2444 2435 2445 #endregion 2446 2447 private void btnAddSubscription_Click(object sender, EventArgs e) 2448 { 2449 if (kLIENCIBindingSource.Current == null) return; 2450 2451 DataRowView row = (DataRowView) kLIENCIBindingSource.Current; 2452 REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow) row.Row; 2453 2454 SubscriptionForm subscriptionForm = new SubscriptionForm(klient.CustomerID); 2455 DialogResult dialog = subscriptionForm.ShowDialog(); 2456 2457 if (dialog == DialogResult.OK) 2458 RefreshSubscriptions(); 2459 } 2460 2461 2462 private void RefreshSubscriptions() 2463 { 2464 if (kLIENCIBindingSource.Current == null) return; 2465 2466 DataRowView row = (DataRowView)kLIENCIBindingSource.Current; 2467 REKLAMADataSet.KLIENCIRow klient = (REKLAMADataSet.KLIENCIRow)row.Row; 2468 2469 CustomerRepository customerRepository = new CustomerRepository(ConnString.getConnString().Value); 2470 List<Subscription> subscriptions = customerRepository.FindSubscriptions(klient.CustomerID); 2471 gridSubscriptions.AutoGenerateColumns = false; 2472 gridSubscriptions.DataSource = subscriptions; 2473 2474 } 2436 2475 } 2437 2476 } -
branches/Abonament/BazaReklam/ClientsForm.resx
r699 r703 700 700 </value> 701 701 </data> 702 <metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 703 <value>True</value> 704 </metadata> 705 <metadata name="Guid.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 706 <value>True</value> 707 </metadata> 708 <metadata name="CustomerId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 709 <value>True</value> 710 </metadata> 711 <metadata name="SubscriptionTypeId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 712 <value>True</value> 713 </metadata> 714 <metadata name="TotalPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 715 <value>True</value> 716 </metadata> 717 <metadata name="Currency.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 718 <value>True</value> 719 </metadata> 720 <metadata name="OrderId.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 721 <value>True</value> 722 </metadata> 723 <metadata name="CreatedOn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 724 <value>True</value> 725 </metadata> 726 <metadata name="CreatedBy.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 727 <value>True</value> 728 </metadata> 729 <metadata name="UpdatedOn.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 730 <value>True</value> 731 </metadata> 732 <metadata name="UpdatedBy.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 733 <value>True</value> 734 </metadata> 735 <metadata name="StartDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 736 <value>True</value> 737 </metadata> 702 738 <data name="usunKlButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 703 739 <value> … … 1576 1612 <value> 1577 1613 iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 1578 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABM dJREFUSEvF1G1M1579 U1cYB/AH1H1w7sPmojHRRV 32kszMLAzMVMIYFg1RsIIOhkOstLUIWIoWdMOqc4yhTtm0iBocFhSLtYjC1580 AFFeKl hfikxBAQEVnJUO2iItbSnc/24l+7CsmMg+7CYnufcm5/97nnPuuUT/55UrolXZfGo4sY6cuQlk1581 d90fiaFk5Wqa8l/r8lAmUqySTyPaw4SanwiXMwhl3xMKUwjZsdSiTqbZ40bUEoovlhFc4bUHRsPL0wil1582 3xHO7yCothNOxZFm3MBpMd2+dmg0/O/qXUDJbkJR6iiQGU/MuS307ngQD1UKWVzhVfvYSiWE46LRkS0g1583 HN04OjKExKj4NOOVARmRZ8E2GjojJSjEhFZFKNAqB9pzgLuZsFRLYbwogOlIEMOcXfDeKwOuCacTqfdk1584 /BTsX0vA7xls8EGg7RjQ9AugSwPqvwHOrgKTN3/RuIBf40j34Kg/2k4sA27sAhrSWegAcJvFru8ENFKg1585 kAsm3/uzsQBPaZ9wTPyMmI48y/nIiZokoDaZrTgV0LKQVgZcTQGqxTBlLWUYhc9MdyFil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59dK1g3UpyEk3UfAxrE970fguZ5/f3W4ibBM2IX2EuFVwiuud7Zq92ubu4n/adVu/Nwnm8RKwSwzsPdt 2336 rW9F8rDv/6vA73GLJJYzBpi4AAAAAElFTkSuQmCC 2301 2337 </value> 2302 2338 </data> -
branches/Abonament/BazaReklam/Raporty/faktura.xml
r429 r703 22 22 <FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_ilosc>No </FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_ilosc> 23 23 <FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn>Unit 24 Price </FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn>24 TotalPrice </FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_cena_jedn> 25 25 <FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_upust_netto>Discount 26 26 Rebate </FAKTURY_DRUK_DETAILS_INTERNATIONALlabel_upust_netto> -
branches/Abonament/BazaReklam/SubscriptionForm.Designer.cs
r702 r703 1 1 namespace Baza_Reklam 2 2 { 3 partial class Subscription 3 partial class SubscriptionForm 4 4 { 5 5 /// <summary> … … 29 29 private void InitializeComponent() 30 30 { 31 this.components = new System.ComponentModel.Container(); 31 32 this.lblSubscriptionType = new System.Windows.Forms.Label(); 32 33 this.cbSubscriptionType = new System.Windows.Forms.ComboBox(); … … 34 35 this.lblCustomerName = new System.Windows.Forms.Label(); 35 36 this.lblPrice = new System.Windows.Forms.Label(); 36 this.txtPrice = new System.Windows.Forms.TextBox();37 this.txtPricePln = new System.Windows.Forms.TextBox(); 37 38 this.lblSubscriptionsCount = new System.Windows.Forms.Label(); 38 this.txtSubscriptionCount = new System.Windows.Forms.TextBox();39 39 this.dateStartDate = new System.Windows.Forms.DateTimePicker(); 40 40 this.lblStartDate = new System.Windows.Forms.Label(); 41 this.btnSave = new System.Windows.Forms.Button(); 41 this.btnAdd = new System.Windows.Forms.Button(); 42 this.txtPriceEur = new System.Windows.Forms.TextBox(); 43 this.label1 = new System.Windows.Forms.Label(); 44 this.label2 = new System.Windows.Forms.Label(); 45 this.txtTotalPricePln = new System.Windows.Forms.TextBox(); 46 this.label3 = new System.Windows.Forms.Label(); 47 this.txtTotalPriceEur = new System.Windows.Forms.TextBox(); 48 this.btnCancel = new System.Windows.Forms.Button(); 49 this.numSubscriptionCount = new System.Windows.Forms.NumericUpDown(); 50 this.lblCurrency = new System.Windows.Forms.Label(); 51 this.cbCurrency = new System.Windows.Forms.ComboBox(); 52 this.numDiscount = new System.Windows.Forms.NumericUpDown(); 53 this.lblDiscount = new System.Windows.Forms.Label(); 54 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 55 ((System.ComponentModel.ISupportInitialize)(this.numSubscriptionCount)).BeginInit(); 56 ((System.ComponentModel.ISupportInitialize)(this.numDiscount)).BeginInit(); 57 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 42 58 this.SuspendLayout(); 43 59 // … … 45 61 // 46 62 this.lblSubscriptionType.AutoSize = true; 47 this.lblSubscriptionType.Location = new System.Drawing.Point( 12, 70);63 this.lblSubscriptionType.Location = new System.Drawing.Point(49, 52); 48 64 this.lblSubscriptionType.Name = "lblSubscriptionType"; 49 65 this.lblSubscriptionType.Size = new System.Drawing.Size(90, 13); … … 53 69 // cbSubscriptionType 54 70 // 71 this.cbSubscriptionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 55 72 this.cbSubscriptionType.FormattingEnabled = true; 56 this.cbSubscriptionType.Location = new System.Drawing.Point(14 8, 62);73 this.cbSubscriptionType.Location = new System.Drawing.Point(145, 44); 57 74 this.cbSubscriptionType.Name = "cbSubscriptionType"; 58 this.cbSubscriptionType.Size = new System.Drawing.Size( 121, 21);75 this.cbSubscriptionType.Size = new System.Drawing.Size(395, 21); 59 76 this.cbSubscriptionType.TabIndex = 1; 77 this.cbSubscriptionType.Validating += new System.ComponentModel.CancelEventHandler(this.cbSubscriptionType_Validating); 78 this.cbSubscriptionType.SelectedIndexChanged += new System.EventHandler(this.cbSubscriptionType_SelectedIndexChanged); 60 79 // 61 80 // lblCustomer 62 81 // 63 82 this.lblCustomer.AutoSize = true; 64 this.lblCustomer.Location = new System.Drawing.Point(1 2, 20);83 this.lblCustomer.Location = new System.Drawing.Point(103, 20); 65 84 this.lblCustomer.Name = "lblCustomer"; 66 85 this.lblCustomer.Size = new System.Drawing.Size(36, 13); 67 this.lblCustomer.TabIndex = 2;86 this.lblCustomer.TabIndex = 0; 68 87 this.lblCustomer.Text = "Klient:"; 69 88 // … … 71 90 // 72 91 this.lblCustomerName.AutoSize = true; 92 this.lblCustomerName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); 73 93 this.lblCustomerName.Location = new System.Drawing.Point(145, 20); 74 94 this.lblCustomerName.Name = "lblCustomerName"; 75 this.lblCustomerName.Size = new System.Drawing.Size( 85, 13);76 this.lblCustomerName.TabIndex = 3;95 this.lblCustomerName.Size = new System.Drawing.Size(99, 13); 96 this.lblCustomerName.TabIndex = 0; 77 97 this.lblCustomerName.Text = "[CustomerName]"; 78 98 // … … 80 100 // 81 101 this.lblPrice.AutoSize = true; 82 this.lblPrice.Location = new System.Drawing.Point(1 3, 114);102 this.lblPrice.Location = new System.Drawing.Point(11, 142); 83 103 this.lblPrice.Name = "lblPrice"; 84 this.lblPrice.Size = new System.Drawing.Size(98, 13); 85 this.lblPrice.TabIndex = 4; 86 this.lblPrice.Text = "Cena jednostkowa:"; 87 // 88 // txtPrice 89 // 90 this.txtPrice.Location = new System.Drawing.Point(148, 111); 91 this.txtPrice.Name = "txtPrice"; 92 this.txtPrice.Size = new System.Drawing.Size(121, 20); 93 this.txtPrice.TabIndex = 5; 104 this.lblPrice.Size = new System.Drawing.Size(128, 13); 105 this.lblPrice.TabIndex = 0; 106 this.lblPrice.Text = "Cena jednostkowa (PLN):"; 107 // 108 // txtPricePln 109 // 110 this.txtPricePln.Location = new System.Drawing.Point(145, 135); 111 this.txtPricePln.Name = "txtPricePln"; 112 this.txtPricePln.ReadOnly = true; 113 this.txtPricePln.Size = new System.Drawing.Size(121, 20); 114 this.txtPricePln.TabIndex = 6; 94 115 // 95 116 // lblSubscriptionsCount 96 117 // 97 118 this.lblSubscriptionsCount.AutoSize = true; 98 this.lblSubscriptionsCount.Location = new System.Drawing.Point( 13, 165);119 this.lblSubscriptionsCount.Location = new System.Drawing.Point(338, 82); 99 120 this.lblSubscriptionsCount.Name = "lblSubscriptionsCount"; 100 this.lblSubscriptionsCount.Size = new System.Drawing.Size(32, 13); 101 this.lblSubscriptionsCount.TabIndex = 6; 102 this.lblSubscriptionsCount.Text = "Iloæ:"; 103 // 104 // txtSubscriptionCount 105 // 106 this.txtSubscriptionCount.Location = new System.Drawing.Point(148, 158); 107 this.txtSubscriptionCount.Name = "txtSubscriptionCount"; 108 this.txtSubscriptionCount.Size = new System.Drawing.Size(121, 20); 109 this.txtSubscriptionCount.TabIndex = 7; 121 this.lblSubscriptionsCount.Size = new System.Drawing.Size(75, 13); 122 this.lblSubscriptionsCount.TabIndex = 0; 123 this.lblSubscriptionsCount.Text = "Iloæ miesiêcy:"; 110 124 // 111 125 // dateStartDate 112 126 // 113 this.dateStartDate.Location = new System.Drawing.Point(148, 213); 127 this.dateStartDate.CustomFormat = "yyyy-MM"; 128 this.dateStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 129 this.dateStartDate.Location = new System.Drawing.Point(145, 75); 114 130 this.dateStartDate.Name = "dateStartDate"; 115 131 this.dateStartDate.Size = new System.Drawing.Size(121, 20); 116 this.dateStartDate.TabIndex = 8;132 this.dateStartDate.TabIndex = 2; 117 133 // 118 134 // lblStartDate 119 135 // 120 136 this.lblStartDate.AutoSize = true; 121 this.lblStartDate.Location = new System.Drawing.Point( 12, 220);137 this.lblStartDate.Location = new System.Drawing.Point(30, 82); 122 138 this.lblStartDate.Name = "lblStartDate"; 123 this.lblStartDate.Size = new System.Drawing.Size(48, 13); 124 this.lblStartDate.TabIndex = 9; 125 this.lblStartDate.Text = "Data od:"; 126 // 127 // btnSave 128 // 129 this.btnSave.Location = new System.Drawing.Point(326, 261); 130 this.btnSave.Name = "btnSave"; 131 this.btnSave.Size = new System.Drawing.Size(75, 23); 132 this.btnSave.TabIndex = 10; 133 this.btnSave.Text = "Zapisz"; 134 this.btnSave.UseVisualStyleBackColor = true; 135 // 136 // Subscription 139 this.lblStartDate.Size = new System.Drawing.Size(109, 13); 140 this.lblStartDate.TabIndex = 0; 141 this.lblStartDate.Text = "Start abonamentu od:"; 142 // 143 // btnAdd 144 // 145 this.btnAdd.DialogResult = System.Windows.Forms.DialogResult.OK; 146 this.btnAdd.Location = new System.Drawing.Point(419, 197); 147 this.btnAdd.Name = "btnAdd"; 148 this.btnAdd.Size = new System.Drawing.Size(75, 23); 149 this.btnAdd.TabIndex = 10; 150 this.btnAdd.Text = "Dodaj"; 151 this.btnAdd.UseVisualStyleBackColor = true; 152 this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); 153 // 154 // txtPriceEur 155 // 156 this.txtPriceEur.Location = new System.Drawing.Point(145, 165); 157 this.txtPriceEur.Name = "txtPriceEur"; 158 this.txtPriceEur.ReadOnly = true; 159 this.txtPriceEur.Size = new System.Drawing.Size(121, 20); 160 this.txtPriceEur.TabIndex = 8; 161 // 162 // label1 163 // 164 this.label1.AutoSize = true; 165 this.label1.Location = new System.Drawing.Point(9, 172); 166 this.label1.Name = "label1"; 167 this.label1.Size = new System.Drawing.Size(130, 13); 168 this.label1.TabIndex = 0; 169 this.label1.Text = "Cena jednostkowa (EUR):"; 170 // 171 // label2 172 // 173 this.label2.AutoSize = true; 174 this.label2.Location = new System.Drawing.Point(298, 142); 175 this.label2.Name = "label2"; 176 this.label2.Size = new System.Drawing.Size(115, 13); 177 this.label2.TabIndex = 0; 178 this.label2.Text = "Cena ca³kowita (PLN):"; 179 // 180 // txtTotalPricePln 181 // 182 this.txtTotalPricePln.Location = new System.Drawing.Point(419, 135); 183 this.txtTotalPricePln.Name = "txtTotalPricePln"; 184 this.txtTotalPricePln.ReadOnly = true; 185 this.txtTotalPricePln.Size = new System.Drawing.Size(121, 20); 186 this.txtTotalPricePln.TabIndex = 7; 187 // 188 // label3 189 // 190 this.label3.AutoSize = true; 191 this.label3.Location = new System.Drawing.Point(296, 172); 192 this.label3.Name = "label3"; 193 this.label3.Size = new System.Drawing.Size(117, 13); 194 this.label3.TabIndex = 0; 195 this.label3.Text = "Cena ca³kowita (EUR):"; 196 // 197 // txtTotalPriceEur 198 // 199 this.txtTotalPriceEur.Location = new System.Drawing.Point(419, 165); 200 this.txtTotalPriceEur.Name = "txtTotalPriceEur"; 201 this.txtTotalPriceEur.ReadOnly = true; 202 this.txtTotalPriceEur.Size = new System.Drawing.Size(121, 20); 203 this.txtTotalPriceEur.TabIndex = 9; 204 // 205 // btnCancel 206 // 207 this.btnCancel.CausesValidation = false; 208 this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 209 this.btnCancel.Location = new System.Drawing.Point(106, 197); 210 this.btnCancel.Name = "btnCancel"; 211 this.btnCancel.Size = new System.Drawing.Size(75, 23); 212 this.btnCancel.TabIndex = 11; 213 this.btnCancel.Text = "Anuluj"; 214 this.btnCancel.UseVisualStyleBackColor = true; 215 this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); 216 // 217 // numSubscriptionCount 218 // 219 this.numSubscriptionCount.Location = new System.Drawing.Point(419, 75); 220 this.numSubscriptionCount.Maximum = new decimal(new int[] { 221 12, 222 0, 223 0, 224 0}); 225 this.numSubscriptionCount.Minimum = new decimal(new int[] { 226 1, 227 0, 228 0, 229 0}); 230 this.numSubscriptionCount.Name = "numSubscriptionCount"; 231 this.numSubscriptionCount.Size = new System.Drawing.Size(91, 20); 232 this.numSubscriptionCount.TabIndex = 3; 233 this.numSubscriptionCount.Value = new decimal(new int[] { 234 1, 235 0, 236 0, 237 0}); 238 this.numSubscriptionCount.ValueChanged += new System.EventHandler(this.numSubscriptionCount_ValueChanged); 239 // 240 // lblCurrency 241 // 242 this.lblCurrency.AutoSize = true; 243 this.lblCurrency.Location = new System.Drawing.Point(95, 112); 244 this.lblCurrency.Name = "lblCurrency"; 245 this.lblCurrency.Size = new System.Drawing.Size(44, 13); 246 this.lblCurrency.TabIndex = 0; 247 this.lblCurrency.Text = "Waluta:"; 248 // 249 // cbCurrency 250 // 251 this.cbCurrency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 252 this.cbCurrency.FormattingEnabled = true; 253 this.cbCurrency.Items.AddRange(new object[] { 254 "PLN", 255 "EUR"}); 256 this.cbCurrency.Location = new System.Drawing.Point(145, 105); 257 this.cbCurrency.Name = "cbCurrency"; 258 this.cbCurrency.Size = new System.Drawing.Size(121, 21); 259 this.cbCurrency.TabIndex = 4; 260 // 261 // numDiscount 262 // 263 this.numDiscount.Location = new System.Drawing.Point(419, 105); 264 this.numDiscount.Maximum = new decimal(new int[] { 265 99, 266 0, 267 0, 268 0}); 269 this.numDiscount.Name = "numDiscount"; 270 this.numDiscount.Size = new System.Drawing.Size(91, 20); 271 this.numDiscount.TabIndex = 5; 272 this.numDiscount.Value = new decimal(new int[] { 273 1, 274 0, 275 0, 276 0}); 277 this.numDiscount.ValueChanged += new System.EventHandler(this.numDiscount_ValueChanged); 278 // 279 // lblDiscount 280 // 281 this.lblDiscount.AutoSize = true; 282 this.lblDiscount.Location = new System.Drawing.Point(357, 112); 283 this.lblDiscount.Name = "lblDiscount"; 284 this.lblDiscount.Size = new System.Drawing.Size(56, 13); 285 this.lblDiscount.TabIndex = 0; 286 this.lblDiscount.Text = "Rabat (%):"; 287 // 288 // errorProvider 289 // 290 this.errorProvider.ContainerControl = this; 291 // 292 // SubscriptionForm 137 293 // 138 294 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 139 295 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 140 this.ClientSize = new System.Drawing.Size(449, 300); 141 this.Controls.Add(this.btnSave); 296 this.ClientSize = new System.Drawing.Size(555, 228); 297 this.Controls.Add(this.numDiscount); 298 this.Controls.Add(this.lblDiscount); 299 this.Controls.Add(this.cbCurrency); 300 this.Controls.Add(this.lblCurrency); 301 this.Controls.Add(this.numSubscriptionCount); 302 this.Controls.Add(this.btnCancel); 303 this.Controls.Add(this.txtTotalPriceEur); 304 this.Controls.Add(this.label3); 305 this.Controls.Add(this.txtTotalPricePln); 306 this.Controls.Add(this.label2); 307 this.Controls.Add(this.txtPriceEur); 308 this.Controls.Add(this.label1); 309 this.Controls.Add(this.btnAdd); 142 310 this.Controls.Add(this.lblStartDate); 143 311 this.Controls.Add(this.dateStartDate); 144 this.Controls.Add(this.txtSubscriptionCount);145 312 this.Controls.Add(this.lblSubscriptionsCount); 146 this.Controls.Add(this.txtPrice );313 this.Controls.Add(this.txtPricePln); 147 314 this.Controls.Add(this.lblPrice); 148 315 this.Controls.Add(this.lblCustomerName); … … 153 320 this.MaximizeBox = false; 154 321 this.MinimizeBox = false; 155 this.Name = "Subscription ";322 this.Name = "SubscriptionForm"; 156 323 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 157 324 this.Text = "Abonament"; 325 ((System.ComponentModel.ISupportInitialize)(this.numSubscriptionCount)).EndInit(); 326 ((System.ComponentModel.ISupportInitialize)(this.numDiscount)).EndInit(); 327 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 158 328 this.ResumeLayout(false); 159 329 this.PerformLayout(); … … 168 338 private System.Windows.Forms.Label lblCustomerName; 169 339 private System.Windows.Forms.Label lblPrice; 170 private System.Windows.Forms.TextBox txtPrice ;340 private System.Windows.Forms.TextBox txtPricePln; 171 341 private System.Windows.Forms.Label lblSubscriptionsCount; 172 private System.Windows.Forms.TextBox txtSubscriptionCount;173 342 private System.Windows.Forms.DateTimePicker dateStartDate; 174 343 private System.Windows.Forms.Label lblStartDate; 175 private System.Windows.Forms.Button btnSave; 344 private System.Windows.Forms.Button btnAdd; 345 private System.Windows.Forms.TextBox txtPriceEur; 346 private System.Windows.Forms.Label label1; 347 private System.Windows.Forms.Label label2; 348 private System.Windows.Forms.TextBox txtTotalPricePln; 349 private System.Windows.Forms.Label label3; 350 private System.Windows.Forms.TextBox txtTotalPriceEur; 351 private System.Windows.Forms.Button btnCancel; 352 private System.Windows.Forms.NumericUpDown numSubscriptionCount; 353 private System.Windows.Forms.Label lblCurrency; 354 private System.Windows.Forms.ComboBox cbCurrency; 355 private System.Windows.Forms.NumericUpDown numDiscount; 356 private System.Windows.Forms.Label lblDiscount; 357 private System.Windows.Forms.ErrorProvider errorProvider; 176 358 } 177 359 } -
branches/Abonament/BazaReklam/SubscriptionForm.cs
r702 r703 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.ComponentModel;4 using System.Data;5 using System.Drawing;6 using System.Text;7 3 using System.Windows.Forms; 4 using Baza_Reklam.Classes.Helpers; 8 5 using Baza_Reklam.Classes.Model; 9 6 using Baza_Reklam.Classes.Repositories; … … 11 8 namespace Baza_Reklam 12 9 { 13 public partial class Subscription : Form10 public partial class SubscriptionForm : Form 14 11 { 15 12 //TODO: Create BaseClass for all forms and inherit from it - there can be defined stuff like connection strings and other dependecies... 16 13 private readonly string _connectionString = ConnString.getConnString().Value; 17 14 18 15 private readonly IRepository<Customer> _customerRepository; 16 private readonly IRepository<SubscriptionType> _subscriptionTypeRepository; 17 private readonly List<SubscriptionType> _subscriptionTypes = new List<SubscriptionType>(); 19 18 private readonly Customer _customer; 20 19 21 public Subscription(int customerId) 20 private SubscriptionType CurrentSubscriptionType 21 { 22 get 23 { 24 if (cbSubscriptionType.SelectedItem == null || ((SubscriptionType)cbSubscriptionType.SelectedItem).Id <= 0) return null; 25 return (SubscriptionType)cbSubscriptionType.SelectedItem; 26 } 27 } 28 29 public SubscriptionForm(int customerId) 22 30 { 23 31 InitializeComponent(); 24 32 25 33 _customerRepository = new CustomerRepository(_connectionString); 26 27 34 _customer = _customerRepository.Find(customerId); 28 35 36 _subscriptionTypeRepository = new SubscriptionTypeRepository(_connectionString); 37 _subscriptionTypes = _subscriptionTypeRepository.FindAll(); 38 39 BindControls(); 40 } 41 42 43 [Obsolete("This is a deprecated method - use ComboBoxHelper after merge from ReklamaReorganizacja branch")] 44 static void BindComboBox<T>(IEnumerable<T> list, ComboBox comboBox) 45 { 46 comboBox.Items.Clear(); 47 foreach (T item in list) 48 { 49 comboBox.Items.Add(item); 50 } 51 } 52 53 private void BindControls() 54 { 29 55 lblCustomerName.Text = _customer.Name; 56 57 BindComboBox(_subscriptionTypes, cbSubscriptionType); 58 cbSubscriptionType.DisplayMember = "Name"; 59 cbSubscriptionType.ValueMember = "Id"; 60 61 cbSubscriptionType.Items.Insert(0, new SubscriptionType(0, "-- proszê wybraæ --", 0, 0)); 62 cbSubscriptionType.SelectedIndex = 0; 63 64 cbCurrency.SelectedIndex = 0; 65 } 66 67 private void SetControls(bool enable) 68 { 69 numSubscriptionCount.Value = 1; 70 numDiscount.Value = 0; 71 if (enable) 72 { 73 numSubscriptionCount.Enabled = true; 74 numDiscount.Enabled = true; 75 txtPricePln.Text = CurrentSubscriptionType.PricePln.ToString(); 76 txtPriceEur.Text = CurrentSubscriptionType.PriceEur.ToString(); 77 ReCalculatePrices(); 78 } 79 else 80 { 81 numSubscriptionCount.Enabled = false; 82 numDiscount.Enabled = false; 83 txtPricePln.Text = string.Empty; 84 txtPriceEur.Text = string.Empty; 85 txtTotalPricePln.Text = string.Empty; 86 txtTotalPriceEur.Text = string.Empty; 87 } 88 } 89 90 private void ReCalculatePrices() 91 { 92 txtTotalPricePln.Text = (numSubscriptionCount.Value * CurrentSubscriptionType.PricePln * (1 - (numDiscount.Value / 100))).ToString(); 93 txtTotalPriceEur.Text = (numSubscriptionCount.Value * CurrentSubscriptionType.PriceEur * (1 - (numDiscount.Value / 100))).ToString(); 94 } 95 96 private void cbSubscriptionType_SelectedIndexChanged(object sender, EventArgs e) 97 { 98 if (cbSubscriptionType.SelectedItem == null) return; 99 100 SubscriptionType subscriptionType = (SubscriptionType)cbSubscriptionType.SelectedItem; 101 102 numSubscriptionCount.Value = 1; 103 104 SetControls(subscriptionType.Id > 0); 105 } 106 107 private void numSubscriptionCount_ValueChanged(object sender, EventArgs e) 108 { 109 if (CurrentSubscriptionType == null) 110 { 111 SetControls(false); 112 return; 113 } 114 115 ReCalculatePrices(); 116 } 117 118 private void numDiscount_ValueChanged(object sender, EventArgs e) 119 { 120 if (CurrentSubscriptionType == null) 121 { 122 SetControls(false); 123 return; 124 } 125 126 ReCalculatePrices(); 127 } 128 129 private void btnAdd_Click(object sender, EventArgs e) 130 { 131 Subscription subscription = new Subscription(); 132 133 subscription.Guid = Guid.NewGuid(); 134 subscription.SubscriptionTypeId = CurrentSubscriptionType.Id; 135 subscription.SubscriptionItems = (int)numSubscriptionCount.Value; 136 137 subscription.BasePrice = cbCurrency.SelectedItem.ToString() == "PLN" 138 ? Decimal.Parse(txtPricePln.Text) 139 : Decimal.Parse(txtPriceEur.Text); 140 141 subscription.Discount = numDiscount.Value / 100; 142 143 subscription.TotalPrice = cbCurrency.SelectedItem.ToString() == "PLN" 144 ? Decimal.Parse(txtTotalPricePln.Text) 145 : Decimal.Parse(txtTotalPriceEur.Text); 146 147 subscription.Currency = cbCurrency.SelectedItem.ToString(); 148 subscription.CreatedBy = User.Instance().Id; 149 subscription.CreatedOn = DateTime.Now; 150 subscription.UpdatedBy = User.Instance().Id; 151 subscription.UpdatedOn = DateTime.Now; 152 subscription.StartDate = dateStartDate.Value; 153 154 for (int i = 0; i < subscription.SubscriptionItems; i++) 155 { 156 SubscriptionDetail subscriptionDetail = new SubscriptionDetail(); 157 subscriptionDetail.Month = dateStartDate.Value.AddMonths(i).Month; 158 subscriptionDetail.Year = dateStartDate.Value.AddMonths(i).Year; 159 subscriptionDetail.Price = subscription.BasePrice * (1 - subscription.Discount); 160 subscriptionDetail.PricePln = Decimal.Parse(txtPricePln.Text) * (1 - subscription.Discount); 161 162 if (subscription.Currency == "PLN") 163 { 164 subscriptionDetail.Vat = (decimal)VatHelper.PL22; 165 } 166 else 167 { 168 subscriptionDetail.Vat = (decimal)VatHelper.EU00; 169 } 170 171 172 subscription.AddSubscriptionDetail(subscriptionDetail); 173 } 174 175 176 _customer.AddSubscription(subscription); 177 _customerRepository.Save(_customer); 178 179 Close(); 180 } 181 182 private void btnCancel_Click(object sender, EventArgs e) 183 { 184 Close(); 185 } 186 187 private void cbSubscriptionType_Validating(object sender, System.ComponentModel.CancelEventArgs e) 188 { 189 ValidationHelper.IsComboValueSelected(cbSubscriptionType, 0, "Proszê wybraæ typ abonamentu", e, errorProvider); 30 190 } 31 191 } -
branches/Abonament/BazaReklam/SubscriptionForm.resx
r702 r703 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>17, 17</value> 122 </metadata> 120 123 </root> -
branches/Abonament/BazaReklam/ZamowieniaForm.Designer.cs
r597 r703 36 36 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); 37 37 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); 38 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();39 38 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ZamowieniaForm)); 40 39 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); 40 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); 41 41 this.zamowieniaDataGridView = new System.Windows.Forms.DataGridView(); 42 42 this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); … … 56 56 this.rEKLAMABindingSource = new System.Windows.Forms.BindingSource(this.components); 57 57 this.rEKLAMADataGridView1 = new System.Windows.Forms.DataGridView(); 58 this.dataGridViewTextBoxColumn72 = new System.Windows.Forms.DataGridViewTextBoxColumn();59 this.Data1Emisji = new System.Windows.Forms.DataGridViewTextBoxColumn();60 this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();61 this.dataGridViewTextBoxColumn90 = new System.Windows.Forms.DataGridViewTextBoxColumn();62 this.dataGridViewTextBoxColumn43 = new System.Windows.Forms.DataGridViewTextBoxColumn();63 this.dataGridViewTextBoxColumn44 = new System.Windows.Forms.DataGridViewTextBoxColumn();64 this.ZATWIERDZONO_DO_DRUKU2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();65 58 this.rEKLAMABindingSource1 = new System.Windows.Forms.BindingSource(this.components); 66 59 this.dodajButton = new System.Windows.Forms.Button(); … … 101 94 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 102 95 this.KlientLabel = new System.Windows.Forms.Label(); 103 this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components); 96 this.Data1Emisji = new System.Windows.Forms.DataGridViewTextBoxColumn(); 97 this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 98 this.dataGridViewTextBoxColumn43 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 99 this.dataGridViewTextBoxColumn44 = new System.Windows.Forms.DataGridViewTextBoxColumn(); 100 this.ZATWIERDZONO_DO_DRUKU2 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); 104 101 ((System.ComponentModel.ISupportInitialize)(this.zamowieniaDataGridView)).BeginInit(); 105 102 ((System.ComponentModel.ISupportInitialize)(this.zamowieniaBindingSource)).BeginInit(); … … 114 111 this.groupBox2.SuspendLayout(); 115 112 this.groupBox3.SuspendLayout(); 116 ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();117 113 this.SuspendLayout(); 118 114 // … … 226 222 this.ZATWIERDZONO_DO_DRUKU}); 227 223 this.rEKLAMADataGridView.DataSource = this.rEKLAMABindingSource; 228 this.rEKLAMADataGridView.Location = new System.Drawing.Point(6, 3 9);224 this.rEKLAMADataGridView.Location = new System.Drawing.Point(6, 33); 229 225 this.rEKLAMADataGridView.MultiSelect = false; 230 226 this.rEKLAMADataGridView.Name = "rEKLAMADataGridView"; … … 232 228 this.rEKLAMADataGridView.RowHeadersWidth = 10; 233 229 this.rEKLAMADataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; 234 this.rEKLAMADataGridView.Size = new System.Drawing.Size(379, 1 67);230 this.rEKLAMADataGridView.Size = new System.Drawing.Size(379, 173); 235 231 this.rEKLAMADataGridView.TabIndex = 1; 236 232 // … … 295 291 dataGridViewCellStyle5.BackColor = System.Drawing.Color.MintCream; 296 292 this.rEKLAMADataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5; 297 this.rEKLAMADataGridView1.AutoGenerateColumns = false;298 293 this.rEKLAMADataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; 299 294 this.rEKLAMADataGridView1.BackgroundColor = System.Drawing.Color.White; … … 308 303 this.rEKLAMADataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6; 309 304 this.rEKLAMADataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { 310 this.dataGridViewTextBoxColumn72,311 305 this.Data1Emisji, 312 306 this.dataGridViewTextBoxColumn1, 313 this.dataGridViewTextBoxColumn90,314 307 this.dataGridViewTextBoxColumn43, 315 308 this.dataGridViewTextBoxColumn44, 316 309 this.ZATWIERDZONO_DO_DRUKU2}); 317 this.rEKLAMADataGridView1.DataSource = this.rEKLAMABindingSource1; 318 this.rEKLAMADataGridView1.Location = new System.Drawing.Point(465, 39); 310 this.rEKLAMADataGridView1.Location = new System.Drawing.Point(465, 33); 319 311 this.rEKLAMADataGridView1.MultiSelect = false; 320 312 this.rEKLAMADataGridView1.Name = "rEKLAMADataGridView1"; … … 322 314 this.rEKLAMADataGridView1.RowHeadersWidth = 10; 323 315 this.rEKLAMADataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; 324 this.rEKLAMADataGridView1.Size = new System.Drawing.Size( 401, 167);316 this.rEKLAMADataGridView1.Size = new System.Drawing.Size(379, 173); 325 317 this.rEKLAMADataGridView1.TabIndex = 2; 326 //327 // dataGridViewTextBoxColumn72328 //329 this.dataGridViewTextBoxColumn72.DataPropertyName = "ID REKLAMY";330 this.dataGridViewTextBoxColumn72.HeaderText = "Symbol";331 this.dataGridViewTextBoxColumn72.Name = "dataGridViewTextBoxColumn72";332 this.dataGridViewTextBoxColumn72.ReadOnly = true;333 //334 // Data1Emisji335 //336 this.Data1Emisji.DataPropertyName = "Data1Emisji";337 this.Data1Emisji.HeaderText = "1 Emisja";338 this.Data1Emisji.Name = "Data1Emisji";339 this.Data1Emisji.ReadOnly = true;340 //341 // dataGridViewTextBoxColumn1342 //343 this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;344 this.dataGridViewTextBoxColumn1.DataPropertyName = "TYP";345 this.dataGridViewTextBoxColumn1.HeaderText = "TYP";346 this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";347 this.dataGridViewTextBoxColumn1.ReadOnly = true;348 this.dataGridViewTextBoxColumn1.Width = 50;349 //350 // dataGridViewTextBoxColumn90351 //352 this.dataGridViewTextBoxColumn90.DataPropertyName = "NETTO";353 this.dataGridViewTextBoxColumn90.HeaderText = "NETTO";354 this.dataGridViewTextBoxColumn90.Name = "dataGridViewTextBoxColumn90";355 this.dataGridViewTextBoxColumn90.ReadOnly = true;356 //357 // dataGridViewTextBoxColumn43358 //359 this.dataGridViewTextBoxColumn43.DataPropertyName = "VAT";360 dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;361 dataGridViewCellStyle7.Format = "P";362 this.dataGridViewTextBoxColumn43.DefaultCellStyle = dataGridViewCellStyle7;363 this.dataGridViewTextBoxColumn43.HeaderText = "VAT";364 this.dataGridViewTextBoxColumn43.Name = "dataGridViewTextBoxColumn43";365 this.dataGridViewTextBoxColumn43.ReadOnly = true;366 //367 // dataGridViewTextBoxColumn44368 //369 this.dataGridViewTextBoxColumn44.DataPropertyName = "Brutto_Euro_Miano";370 this.dataGridViewTextBoxColumn44.HeaderText = "Waluta";371 this.dataGridViewTextBoxColumn44.Name = "dataGridViewTextBoxColumn44";372 this.dataGridViewTextBoxColumn44.ReadOnly = true;373 //374 // ZATWIERDZONO_DO_DRUKU2375 //376 this.ZATWIERDZONO_DO_DRUKU2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;377 this.ZATWIERDZONO_DO_DRUKU2.DataPropertyName = "ZATWIERDZONO DO DRUKU";378 this.ZATWIERDZONO_DO_DRUKU2.HeaderText = "ZD";379 this.ZATWIERDZONO_DO_DRUKU2.Name = "ZATWIERDZONO_DO_DRUKU2";380 this.ZATWIERDZONO_DO_DRUKU2.ReadOnly = true;381 this.ZATWIERDZONO_DO_DRUKU2.Width = 25;382 318 // 383 319 // rEKLAMABindingSource1 … … 625 561 this.groupBox1.TabIndex = 12; 626 562 this.groupBox1.TabStop = false; 627 this.groupBox1.Text = "Dodawanie reklamdo zamówienia";563 this.groupBox1.Text = "Dodawanie produktów do zamówienia"; 628 564 // 629 565 // reklama2Button … … 641 577 // 642 578 this.reklama1Button.Image = ((System.Drawing.Image)(resources.GetObject("reklama1Button.Image"))); 643 this.reklama1Button.Location = new System.Drawing.Point( 9, 212);579 this.reklama1Button.Location = new System.Drawing.Point(6, 212); 644 580 this.reklama1Button.Name = "reklama1Button"; 645 581 this.reklama1Button.Size = new System.Drawing.Size(37, 38); … … 652 588 // 653 589 this.label2.AutoSize = true; 654 this.label2.Location = new System.Drawing.Point(46 2, 23);590 this.label2.Location = new System.Drawing.Point(465, 17); 655 591 this.label2.Name = "label2"; 656 this.label2.Size = new System.Drawing.Size(10 4, 13);592 this.label2.Size = new System.Drawing.Size(105, 13); 657 593 this.label2.TabIndex = 7; 658 this.label2.Text = " Reklamy do dodania";594 this.label2.Text = "Produkty do dodania"; 659 595 // 660 596 // label1 661 597 // 662 598 this.label1.AutoSize = true; 663 this.label1.Location = new System.Drawing.Point( 23, 23);599 this.label1.Location = new System.Drawing.Point(6, 17); 664 600 this.label1.Name = "label1"; 665 this.label1.Size = new System.Drawing.Size(11 7, 13);601 this.label1.Size = new System.Drawing.Size(118, 13); 666 602 this.label1.TabIndex = 6; 667 this.label1.Text = " Reklamy w zamówieniu";603 this.label1.Text = "Produkty w zamówieniu"; 668 604 // 669 605 // groupBox2 … … 772 708 this.KlientLabel.Text = "----"; 773 709 // 774 // errorProvider1 775 // 776 this.errorProvider1.ContainerControl = this; 710 // Data1Emisji 711 // 712 this.Data1Emisji.DataPropertyName = "StartDate"; 713 this.Data1Emisji.HeaderText = "1 Emisja"; 714 this.Data1Emisji.Name = "Data1Emisji"; 715 this.Data1Emisji.ReadOnly = true; 716 // 717 // dataGridViewTextBoxColumn1 718 // 719 this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 720 this.dataGridViewTextBoxColumn1.DataPropertyName = "Type"; 721 this.dataGridViewTextBoxColumn1.HeaderText = "Typ"; 722 this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; 723 this.dataGridViewTextBoxColumn1.ReadOnly = true; 724 this.dataGridViewTextBoxColumn1.Width = 50; 725 // 726 // dataGridViewTextBoxColumn43 727 // 728 this.dataGridViewTextBoxColumn43.DataPropertyName = "Vat"; 729 dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; 730 dataGridViewCellStyle7.Format = "P"; 731 this.dataGridViewTextBoxColumn43.DefaultCellStyle = dataGridViewCellStyle7; 732 this.dataGridViewTextBoxColumn43.HeaderText = "Vat"; 733 this.dataGridViewTextBoxColumn43.Name = "dataGridViewTextBoxColumn43"; 734 this.dataGridViewTextBoxColumn43.ReadOnly = true; 735 // 736 // dataGridViewTextBoxColumn44 737 // 738 this.dataGridViewTextBoxColumn44.DataPropertyName = "Currency"; 739 this.dataGridViewTextBoxColumn44.HeaderText = "Waluta"; 740 this.dataGridViewTextBoxColumn44.Name = "dataGridViewTextBoxColumn44"; 741 this.dataGridViewTextBoxColumn44.ReadOnly = true; 742 // 743 // ZATWIERDZONO_DO_DRUKU2 744 // 745 this.ZATWIERDZONO_DO_DRUKU2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; 746 this.ZATWIERDZONO_DO_DRUKU2.DataPropertyName = "IsActivated"; 747 this.ZATWIERDZONO_DO_DRUKU2.HeaderText = "ZD"; 748 this.ZATWIERDZONO_DO_DRUKU2.Name = "ZATWIERDZONO_DO_DRUKU2"; 749 this.ZATWIERDZONO_DO_DRUKU2.ReadOnly = true; 750 this.ZATWIERDZONO_DO_DRUKU2.Width = 25; 777 751 // 778 752 // ZamowieniaForm … … 802 776 this.groupBox2.ResumeLayout(false); 803 777 this.groupBox3.ResumeLayout(false); 804 ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();805 778 this.ResumeLayout(false); 806 779 this.PerformLayout(); … … 868 841 private System.Windows.Forms.DataGridViewTextBoxColumn kodAgenta; 869 842 private System.Windows.Forms.Button proformaButton; 870 private System.Windows.Forms.ErrorProvider errorProvider1;871 private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn72;872 843 private System.Windows.Forms.DataGridViewTextBoxColumn Data1Emisji; 873 844 private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; 874 private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn90;875 845 private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn43; 876 846 private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn44; -
branches/Abonament/BazaReklam/ZamowieniaForm.cs
r676 r703 7 7 using Baza_Reklam.Classes.Helpers; 8 8 using Baza_Reklam.Classes.Interfaces; 9 using Baza_Reklam.Classes.Model; 10 using Baza_Reklam.Classes.Repositories; 9 11 10 12 namespace Baza_Reklam … … 96 98 private void ZamowieniaForm_Load(object sender, EventArgs e) 97 99 { 100 CustomerRepository customerRepository = new CustomerRepository(ConnString.getConnString().Value); 101 102 103 rEKLAMADataGridView1.AutoGenerateColumns = false; 104 rEKLAMADataGridView1.DataSource = customerRepository.FindProductsWithoutOrders(klient.CustomerID); 105 106 98 107 usunFaktureButton.Enabled = User.Instance().IsKierownik; 99 108 dtpZmianaDaty.Enabled = User.Instance().IsKierownik; -
branches/Abonament/BazaReklam/ZamowieniaForm.resx
r349 r703 131 131 </metadata> 132 132 <metadata name="zamowieniaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 133 <value>1 62, 17</value>133 <value>153, 17</value> 134 134 </metadata> 135 135 <metadata name="rEKLAMADataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> … … 149 149 </metadata> 150 150 <metadata name="rEKLAMABindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 151 <value> 431, 54</value>151 <value>1087, 17</value> 152 152 </metadata> 153 153 <metadata name="Data1Emisji.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> … … 167 167 </metadata> 168 168 <metadata name="rEKLAMABindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 169 <value> 598, 54</value>169 <value>17, 54</value> 170 170 </metadata> 171 171 <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> … … 203 203 </data> 204 204 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 205 <value> 17, 54</value>205 <value>673, 17</value> 206 206 </metadata> 207 207 <data name="dodajDoZamButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> … … 316 316 </metadata> 317 317 <metadata name="fAKTURYBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 318 <value> 102, 54</value>318 <value>758, 17</value> 319 319 </metadata> 320 320 <data name="WydrukButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> … … 349 349 </data> 350 350 <metadata name="zamowieniaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 351 <value>3 57, 17</value>351 <value>334, 17</value> 352 352 </metadata> 353 353 <metadata name="rEKLAMATableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 354 <value>5 43, 17</value>354 <value>510, 17</value> 355 355 </metadata> 356 356 <metadata name="fAKTURYTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 357 <value> 269, 54</value>357 <value>925, 17</value> 358 358 </metadata> 359 359 <data name="edytujButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> … … 539 539 </value> 540 540 </data> 541 <metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">542 <value>17, 91</value>543 </metadata>544 541 <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 545 542 <value>183</value> -
branches/Abonament/BazaReklam/app.config
r678 r703 8 8 <connectionStrings> 9 9 <clear /> 10 <add name="BAZA_REKLAM_TEST" connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM_TEST;Persist Security Info=True" 11 providerName="System.Data.SqlClient" /> 10 12 <add name="BAZA_REKLAM" connectionString="Data Source=sql.ct.com.pl;Initial Catalog=BAZA_REKLAM;Persist Security Info=True" 11 13 providerName="System.Data.SqlClient" />
