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

Wersja 86, 4.4 KB (wprowadzona przez dorota, 17 years temu)
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
63namespace Baza_Reklam {
64
65
66    partial class REKLAMADataSet
67    {
68        partial class WplatyDataTable
69        {
70        }
71   
72        partial class VIEW_ZESTAWIENIE_FAKTUR_NOWEDataTable
73        {
74        }
75
76        partial class REKLAMADataTable
77        {
78            public double sumaNetto()
79            {
80                double suma = 0;
81             
82                if (Rows.Count > 0)
83                {
84                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
85                }
86               
87                return suma;
88            }
89        }
90
91        partial class zamowieniaDataTable
92        {
93            /// <summary>
94            /// Do wywołania jeżeli z tablicy są wszystkie zamówienia klienta
95            /// </summary>
96            public int nrKolejnegoZamowienia(int rok)
97            {
98                int nowyNr = 1;
99               
100                if (Rows.Count > 0)
101                {
102                    nowyNr = (int)this.Compute("Count(idZamowienia)", "rokZamowienia=" + rok);
103                }
104
105                return nowyNr;
106            }
107        }
108
109        partial class UKAZE_SIE_W_NRDataTable
110        {
111
112            public int Count2
113            {
114                get
115                {
116                    return (int)this.Compute("count(id)", "status <> 2");
117                }
118            }
119
120            public int PoliczAktywne(int reklamaId)
121            {
122                return (int)this.Compute("count(id)", " reklamaID=" + reklamaId + " and status <> 2");
123            }
124
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
134            /*
135            public double sumaNetto(string tytul,  )
136            {
137                double suma = 0;
138
139                if (Rows.Count > 0)
140                {
141                    suma = (double)this.Compute("Sum(netto)", "netto is not null");
142                }
143
144                return suma;
145            }*/
146        }
147           
148
149        partial class REKLAMA_STRONADataTable
150        {
151        }
152   
153        partial class KONTAKTYDataTable
154        {
155           
156        }
157
158     
159
160    }
161}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.