root/tags/BazaReklam_1.2.9/REKLAMADataSet.cs

Wersja 135, 4.8 KB (wprowadzona przez dorota, 17 years temu)

wplaty widocznie w starym zestawieniu faktur

Line 
1using System;
2using System.Data;
3using System.Data.SqlClient;
4
5namespace Baza_Reklam.REKLAMADataSetTableAdapters
6{
7    partial class REKLAMATableAdapter
8    {
9        public void AttachTransaction(SqlTransaction transaction)
10        {
11            this.Adapter.InsertCommand.Transaction = transaction;
12            this.Adapter.UpdateCommand.Transaction = transaction;
13            this.Adapter.DeleteCommand.Transaction = transaction;
14        }
15    }
16
17    partial class FAKTURA_DETAILSTableAdapter
18    {
19        public void AttachTransaction(SqlTransaction transaction)
20        {
21            this.Adapter.InsertCommand.Transaction = transaction;
22            this.Adapter.UpdateCommand.Transaction = transaction;
23            this.Adapter.DeleteCommand.Transaction = transaction;
24        }
25    }
26
27    partial class UKAZE_SIE_W_NRTableAdapter
28    {
29        public void AttachTransaction(SqlTransaction transaction)
30        {
31            this.Adapter.InsertCommand.Transaction = transaction;
32            this.Adapter.UpdateCommand.Transaction = transaction;
33            this.Adapter.DeleteCommand.Transaction = transaction;
34
35            foreach (SqlCommand c in this.CommandCollection)
36            {
37                c.Transaction = transaction;
38            }
39        }
40    }
41
42    partial class zamowieniaTableAdapter
43    {
44        public void AttachTransaction(SqlTransaction transaction)
45        {
46            this.Adapter.InsertCommand.Transaction = transaction;
47            this.Adapter.UpdateCommand.Transaction = transaction;
48            this.Adapter.DeleteCommand.Transaction = transaction;
49        }
50    }
51
52    partial class FAKTURYTableAdapter
53    {
54        public void AttachTransaction(SqlTransaction transaction)
55        {
56            this.Adapter.InsertCommand.Transaction = transaction;
57            this.Adapter.UpdateCommand.Transaction = transaction;
58            this.Adapter.DeleteCommand.Transaction = transaction;
59        }
60    }
61
62    partial class WplatyTableAdapter
63    {
64        public void AttachTransaction(SqlTransaction transaction)
65        {
66            this.Adapter.InsertCommand.Transaction = transaction;
67            this.Adapter.UpdateCommand.Transaction = transaction;
68            this.Adapter.DeleteCommand.Transaction = transaction;
69        }
70    }
71}
72
73namespace Baza_Reklam {
74
75
76    partial class REKLAMADataSet
77    {
78        partial class ZestawienieFakturDataTable
79        {
80        }
81   
82        partial class WplatyDataTable
83        {
84        }
85   
86        partial class VIEW_ZESTAWIENIE_FAKTUR_NOWEDataTable
87        {
88        }
89
90        partial class REKLAMADataTable
91        {
92            public double sumaNetto()
93            {
94                double suma = 0;
95             
96                if (Rows.Count > 0)
97                {
98                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
99                }
100               
101                return suma;
102            }
103        }
104
105        partial class zamowieniaDataTable
106        {
107            /// <summary>
108            /// Do wywołania jeżeli z tablicy są wszystkie zamówienia klienta
109            /// </summary>
110            public int nrKolejnegoZamowienia(int rok)
111            {
112                int nowyNr = 1;
113               
114                if (Rows.Count > 0)
115                {
116                    nowyNr = (int)this.Compute("Count(idZamowienia)", "rokZamowienia=" + rok);
117                }
118
119                return nowyNr;
120            }
121        }
122
123        partial class UKAZE_SIE_W_NRDataTable
124        {
125
126            public int Count2
127            {
128                get
129                {
130                    return (int)this.Compute("count(id)", "status <> 2");
131                }
132            }
133
134            public int PoliczAktywne(int reklamaId)
135            {
136                return (int)this.Compute("count(id)", " reklamaID=" + reklamaId + " and status <> 2");
137            }
138
139            public short MaxZafakturowanyNrWydania()
140            {
141                if ((int)this.Compute("count(id)", "zafakturowana=1") > 0)
142                {
143                    return (short)this.Compute("max([Nr Wydania])", "zafakturowana=1");
144                }
145                return 0;
146            }
147
148            /*
149            public double sumaNetto(string tytul,  )
150            {
151                double suma = 0;
152
153                if (Rows.Count > 0)
154                {
155                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
156                }
157
158                return suma;
159            }*/
160        }
161           
162
163        partial class REKLAMA_STRONADataTable
164        {
165        }
166   
167        partial class KONTAKTYDataTable
168        {
169           
170        }
171
172     
173
174    }
175}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.