Zbiór zmian 86

Pokaż
Ignoruj:
Data:
2008-12-28 02:53:56 (17 years ago)
Autor:
dorota
Opis:
 
Lokalizacja:
Baza Reklam 2 - Faktury
Pliki:
5 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • Baza Reklam 2 - Faktury/KalendarzEmisji.cs

    r65 r86  
    4141        short nowaEmisja; 
    4242 
     43        int iloscEmisji; 
     44        int index = -1; 
     45 
     46        public DateTime dataOstatatniejZafakturowanejEmisji = DateTime.Today; 
     47 
     48        #region properties 
     49 
    4350        public short NowaEmisja 
    4451        { 
     
    4653            set { nowaEmisja = value; } 
    4754        } 
    48         int iloscEmisji; 
    49         int index = -1; 
    50  
    51         #region properties 
    5255 
    5356        public string Tytul 
     
    6669            this.reklama = reklama; 
    6770            this.emisje = emisje; 
    68              
     71 
    6972            foreach (DataRow r in emisje.Rows) 
    7073            { 
     
    7477                } 
    7578            } 
    76              
     79 
    7780            label2.Text = iloscEmisji.ToString(); 
    7881 
     
    110113            } 
    111114 
     115            short nr = Emisje.MaxZafakturowanyNrWydania(); 
     116   
     117            if (nr != 0) 
     118            { 
     119                dataOstatatniejZafakturowanejEmisji = this.sLOWNIKDataSet.NR.dataWydania(Tytul, nr); 
     120            } 
     121 
    112122            nRDataGridView.CellValueChanged += nRDataGridView_CellValueChanged; 
    113123            nRDataGridView.CellContentClick += nRDataGridView_CellContentClicked; 
     124 
     125            nRBindingSource.ResetBindings(false); 
    114126        } 
    115127 
     
    179191                            nRDataGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White; 
    180192                        } 
    181                         
     193 
    182194                    } 
    183195                } 
     
    209221                foreach (DataGridViewRow row in nRDataGridView.Rows) 
    210222                { 
    211  
    212223                    row.DefaultCellStyle.BackColor = Color.White; 
    213224 
     
    223234                            (REKLAMADataSet.UKAZE_SIE_W_NRRow)table[0]; 
    224235 
    225  
    226236                        if (Convert.ToDateTime(row.Cells[1].Value) < DateTime.Today) 
    227237                        { 
    228238                            row.DefaultCellStyle.BackColor = Color.MintCream; 
    229239                        } 
    230  
    231                         if (em.zafakturowana) 
    232                         { 
     240                        else 
     241                        { 
     242                            if (em.zafakturowana) 
     243                            { 
     244                                row.DefaultCellStyle.BackColor = Color.LightGray; 
     245                            } 
     246 
     247                            //anulowana 
     248                            if (em.status == 2) 
     249                            { 
     250                                row.DefaultCellStyle.ForeColor = Color.Red; 
     251                            } 
     252 
     253                            if (emisjaDoZmiany == (short)row.Cells[0].Value) 
     254                            { 
     255                                row.DefaultCellStyle.BackColor = Color.MistyRose; 
     256                            } 
     257                        } 
     258                    } 
     259                    else if (emisjaDoZmiany == 0) 
     260                    { 
     261                        //emisja nie zosta³a wczeœniej wybrana, ale jej misi¹c ju¿ 
     262                        // jest zafakturowany 
     263                        DateTime dataWydania = (DateTime)row.Cells[1].Value; 
     264                        if (dataWydania.Year <= dataOstatatniejZafakturowanejEmisji.Year 
     265                            && 
     266                            dataWydania.Month <= dataOstatatniejZafakturowanejEmisji.Month) 
     267                        { 
     268                            row.ReadOnly = true; 
    233269                            row.DefaultCellStyle.BackColor = Color.LightGray; 
    234270                        } 
    235  
    236                         //anulowana 
    237                         if (em.status == 2) 
    238                         { 
    239                             row.DefaultCellStyle.ForeColor = Color.Red; 
    240                         } 
    241  
    242                         if (emisjaDoZmiany == (short)row.Cells[0].Value) 
    243                         { 
    244                             row.DefaultCellStyle.BackColor = Color.MistyRose; 
    245                         } 
    246                     } 
    247                 } 
    248             } 
    249         } 
    250  
     271                    } 
     272                } 
     273            } 
     274        } 
    251275    } 
    252276} 
  • Baza Reklam 2 - Faktury/OrderDetails.cs

    r84 r86  
    12221222                { 
    12231223                    DataRow[] rows = kalendarz.Emisje.Select("1=1", "[nr wydania] asc"); 
    1224                    // this.rEKLAMADataSet.UKAZE_SIE_W_NR.Clear(); 
     1224                    // this.rEKLAMADataSet.UKAZE_SIE_W_NR.Clear(); 
    12251225                    for (int i = 0; i < rows.Length; i++) 
    12261226                    { 
    12271227                        if (rEKLAMADataSet.UKAZE_SIE_W_NR.FindByID( 
    1228                             Convert.ToDecimal(rows[i]["id"])) == null){ 
    1229                         this.rEKLAMADataSet.UKAZE_SIE_W_NR.ImportRow( 
    1230                             (REKLAMADataSet.UKAZE_SIE_W_NRRow)rows[i]); 
     1228                            Convert.ToDecimal(rows[i]["id"])) == null) 
     1229                        { 
     1230                            this.rEKLAMADataSet.UKAZE_SIE_W_NR.ImportRow( 
     1231                                (REKLAMADataSet.UKAZE_SIE_W_NRRow)rows[i]); 
    12311232                        } 
    12321233                    } 
    12331234 
    12341235                    kalendarz.Close(); 
    1235                  
    1236                 } 
    1237                  
    1238                 ukazeSieDataGridView.EndEdit(); 
    1239                 rEKLAMAUKAZESIEWNRBindingSource.EndEdit(); 
    1240  
    1241                 // int il = this.rEKLAMADataSet.UKAZE_SIE_W_NR.Count; 
    1242                 int il = ukazeSieDataGridView.Rows.Count; 
    1243                 this.kROTNOSCTextBox.Text = il.ToString(); 
    1244                 this.liczbaEmisjiLabel.Text = il.ToString(); 
    1245                 rEKLAMABindingSource.EndEdit(); 
    1246  
    1247                 PrzeliczCaleZamowienie(); 
    1248             } 
    1249  
     1236 
     1237                    ukazeSieDataGridView.EndEdit(); 
     1238                    rEKLAMAUKAZESIEWNRBindingSource.EndEdit(); 
     1239 
     1240                    // int il = this.rEKLAMADataSet.UKAZE_SIE_W_NR.Count; 
     1241                    int il = ukazeSieDataGridView.Rows.Count; 
     1242                    this.kROTNOSCTextBox.Text = il.ToString(); 
     1243                    this.liczbaEmisjiLabel.Text = il.ToString(); 
     1244                    rEKLAMABindingSource.EndEdit(); 
     1245 
     1246                    PrzeliczCaleZamowienie(); 
     1247                } 
     1248            } 
    12501249        } 
    12511250 
     
    15881587                { 
    15891588                    walutyComboBox.SelectedItem = reklama.Brutto_Euro_Miano; 
     1589                    kurs = PobierzKurs(walutyComboBox.SelectedItem.ToString()); 
    15901590                } 
    15911591                else 
  • Baza Reklam 2 - Faktury/REKLAMADataSet.cs

    r81 r86  
    123123            } 
    124124 
     125            public short MaxZafakturowanyNrWydania() 
     126            { 
     127                if ((int)this.Compute("count(id)", "zafakturowana=1") > 0) 
     128                { 
     129                    return (short)this.Compute("max([Nr Wydania])", "zafakturowana=1"); 
     130                } 
     131                return 0; 
     132            } 
     133 
    125134            /* 
    126135            public double sumaNetto(string tytul,  ) 
  • Baza Reklam 2 - Faktury/SLOWNIKDataSet.cs

    r65 r86  
    1 namespace Baza_Reklam { 
     1using System; 
     2using System.Data; 
     3 
     4namespace Baza_Reklam { 
    25 
    36 
    47    partial class SLOWNIKDataSet 
    58    { 
    6  
     9        partial class NRDataTable 
     10        { 
     11            public DateTime dataWydania(string tytul, short nr) 
     12            { 
     13                DataRow[] rows = this.Select("tyt='" + tytul + "' and nrw=" + nr); 
     14                if (rows.Length > 0) 
     15                { 
     16                    return (DateTime)rows[0]["DATA_W"]; 
     17                } 
     18                return DateTime.Today; 
     19            } 
     20        } 
    721 
    822        partial class Kursy_WalutDataTable 
    923        { 
     24             
    1025        } 
    1126    }