root/Baza Reklam 2 - Faktury/REKLAMADataSet.cs @ 721

Wersja 91, 4.7 KB (wprowadzona przez dorota, 17 years temu)

dodawanie wplat przy wystawianiu faktury

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 WplatyDataTable
79        {
80        }
81   
82        partial class VIEW_ZESTAWIENIE_FAKTUR_NOWEDataTable
83        {
84        }
85
86        partial class REKLAMADataTable
87        {
88            public double sumaNetto()
89            {
90                double suma = 0;
91             
92                if (Rows.Count > 0)
93                {
94                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
95                }
96               
97                return suma;
98            }
99        }
100
101        partial class zamowieniaDataTable
102        {
103            /// <summary>
104            /// Do wywołania jeżeli z tablicy są wszystkie zamówienia klienta
105            /// </summary>
106            public int nrKolejnegoZamowienia(int rok)
107            {
108                int nowyNr = 1;
109               
110                if (Rows.Count > 0)
111                {
112                    nowyNr = (int)this.Compute("Count(idZamowienia)", "rokZamowienia=" + rok);
113                }
114
115                return nowyNr;
116            }
117        }
118
119        partial class UKAZE_SIE_W_NRDataTable
120        {
121
122            public int Count2
123            {
124                get
125                {
126                    return (int)this.Compute("count(id)", "status <> 2");
127                }
128            }
129
130            public int PoliczAktywne(int reklamaId)
131            {
132                return (int)this.Compute("count(id)", " reklamaID=" + reklamaId + " and status <> 2");
133            }
134
135            public short MaxZafakturowanyNrWydania()
136            {
137                if ((int)this.Compute("count(id)", "zafakturowana=1") > 0)
138                {
139                    return (short)this.Compute("max([Nr Wydania])", "zafakturowana=1");
140                }
141                return 0;
142            }
143
144            /*
145            public double sumaNetto(string tytul,  )
146            {
147                double suma = 0;
148
149                if (Rows.Count > 0)
150                {
151                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
152                }
153
154                return suma;
155            }*/
156        }
157           
158
159        partial class REKLAMA_STRONADataTable
160        {
161        }
162   
163        partial class KONTAKTYDataTable
164        {
165           
166        }
167
168     
169
170    }
171}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.