Pokaż
Ignoruj:
Data:
2008-12-14 23:40:38 (17 years ago)
Autor:
dorota
Opis:
 
Pliki:
1 zmodyfikowane

Legenda:

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

    r4 r7  
    58825882            private global::System.Data.DataColumn columnwyroznienie; 
    58835883             
     5884            private global::System.Data.DataColumn columnreklamaId; 
     5885             
    58845886            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
    58855887            public FAKTURA_DETAILSDataTable() { 
     
    60496051                get { 
    60506052                    return this.columnwyroznienie; 
     6053                } 
     6054            } 
     6055             
     6056            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     6057            public global::System.Data.DataColumn reklamaIdColumn { 
     6058                get { 
     6059                    return this.columnreklamaId; 
    60516060                } 
    60526061            } 
     
    61006109                        short TYP,  
    61016110                        short PODTYP,  
    6102                         bool wyroznienie) { 
     6111                        bool wyroznienie,  
     6112                        int reklamaId) { 
    61036113                FAKTURA_DETAILSRow rowFAKTURA_DETAILSRow = ((FAKTURA_DETAILSRow)(this.NewRow())); 
    61046114                object[] columnValuesArray = new object[] { 
     
    61226132                        TYP, 
    61236133                        PODTYP, 
    6124                         wyroznienie}; 
     6134                        wyroznienie, 
     6135                        reklamaId}; 
    61256136                if ((parentFAKTURYRowByFAKTURY_FAKTURA_DETAILS != null)) { 
    61266137                    columnValuesArray[1] = parentFAKTURYRowByFAKTURY_FAKTURA_DETAILS[0]; 
     
    61766187                this.columnPODTYP = base.Columns["PODTYP"]; 
    61776188                this.columnwyroznienie = base.Columns["wyroznienie"]; 
     6189                this.columnreklamaId = base.Columns["reklamaId"]; 
    61786190            } 
    61796191             
     
    62246236                this.columnwyroznienie = new global::System.Data.DataColumn("wyroznienie", typeof(bool), null, global::System.Data.MappingType.Element); 
    62256237                base.Columns.Add(this.columnwyroznienie); 
     6238                this.columnreklamaId = new global::System.Data.DataColumn("reklamaId", typeof(int), null, global::System.Data.MappingType.Element); 
     6239                base.Columns.Add(this.columnreklamaId); 
    62266240                this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { 
    62276241                                this.columnID_FAKTURA_DETAILS}, true)); 
     
    2230222316             
    2230322317            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     22318            public int reklamaId { 
     22319                get { 
     22320                    try { 
     22321                        return ((int)(this[this.tableFAKTURA_DETAILS.reklamaIdColumn])); 
     22322                    } 
     22323                    catch (global::System.InvalidCastException e) { 
     22324                        throw new global::System.Data.StrongTypingException("The value for column \'reklamaId\' in table \'FAKTURA_DETAILS\' is DBNull.", e); 
     22325                    } 
     22326                } 
     22327                set { 
     22328                    this[this.tableFAKTURA_DETAILS.reklamaIdColumn] = value; 
     22329                } 
     22330            } 
     22331             
     22332            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
    2230422333            public FAKTURYRow FAKTURYRow { 
    2230522334                get { 
     
    2249922528            public void SetwyroznienieNull() { 
    2250022529                this[this.tableFAKTURA_DETAILS.wyroznienieColumn] = global::System.Convert.DBNull; 
     22530            } 
     22531             
     22532            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     22533            public bool IsreklamaIdNull() { 
     22534                return this.IsNull(this.tableFAKTURA_DETAILS.reklamaIdColumn); 
     22535            } 
     22536             
     22537            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     22538            public void SetreklamaIdNull() { 
     22539                this[this.tableFAKTURA_DETAILS.reklamaIdColumn] = global::System.Convert.DBNull; 
    2250122540            } 
    2250222541        } 
     
    3366433703        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
    3366533704        private void InitCommandCollection() { 
    33666             this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; 
     33705            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[7]; 
    3366733706            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 
    3366833707            this._commandCollection[0].Connection = this.Connection; 
     
    3371733756            this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; 
    3371833757            this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@param1", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ReklamaId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     33758            this._commandCollection[6] = new global::System.Data.SqlClient.SqlCommand(); 
     33759            this._commandCollection[6].Connection = this.Connection; 
     33760            this._commandCollection[6].CommandText = "UPDATE    [UKAŻE SIĘ W NR]\r\nSET              zafakturowana = @zafakturowana, idFa" + 
     33761                "ktury = @idFaktury, netto = @netto\r\nWHERE     (ID = @Original_ID)"; 
     33762            this._commandCollection[6].CommandType = global::System.Data.CommandType.Text; 
     33763            this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@zafakturowana", global::System.Data.SqlDbType.Bit, 1, global::System.Data.ParameterDirection.Input, 0, 0, "zafakturowana", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     33764            this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idFaktury", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idFaktury", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     33765            this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@netto", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 0, 0, "netto", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     33766            this._commandCollection[6].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID", global::System.Data.SqlDbType.Decimal, 9, global::System.Data.ParameterDirection.Input, 18, 0, "ID", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 
    3371933767        } 
    3372033768         
     
    3402434072        public virtual int Update(int ReklamaId, short Nr_Wydania, short status, bool zafakturowana, global::System.Nullable<int> idFaktury, global::System.Nullable<global::System.DateTime> dataDodania, global::System.Nullable<global::System.DateTime> dataAnulowania, global::System.Nullable<double> netto, decimal Original_ID) { 
    3402534073            return this.Update(ReklamaId, Nr_Wydania, status, zafakturowana, idFaktury, dataDodania, dataAnulowania, netto, Original_ID, Original_ID); 
     34074        } 
     34075         
     34076        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     34077        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 
     34078        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, false)] 
     34079        public virtual int UpdatePoUsunieciuFaktury(bool zafakturowana, global::System.Nullable<int> idFaktury, global::System.Nullable<float> netto, decimal Original_ID) { 
     34080            global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[6]; 
     34081            command.Parameters[0].Value = ((bool)(zafakturowana)); 
     34082            if ((idFaktury.HasValue == true)) { 
     34083                command.Parameters[1].Value = ((int)(idFaktury.Value)); 
     34084            } 
     34085            else { 
     34086                command.Parameters[1].Value = global::System.DBNull.Value; 
     34087            } 
     34088            if ((netto.HasValue == true)) { 
     34089                command.Parameters[2].Value = ((float)(netto.Value)); 
     34090            } 
     34091            else { 
     34092                command.Parameters[2].Value = global::System.DBNull.Value; 
     34093            } 
     34094            command.Parameters[3].Value = ((decimal)(Original_ID)); 
     34095            global::System.Data.ConnectionState previousConnectionState = command.Connection.State; 
     34096            if (((command.Connection.State & global::System.Data.ConnectionState.Open)  
     34097                        != global::System.Data.ConnectionState.Open)) { 
     34098                command.Connection.Open(); 
     34099            } 
     34100            int returnValue; 
     34101            try { 
     34102                returnValue = command.ExecuteNonQuery(); 
     34103            } 
     34104            finally { 
     34105                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { 
     34106                    command.Connection.Close(); 
     34107                } 
     34108            } 
     34109            return returnValue; 
    3402634110        } 
    3402734111    } 
     
    3765237736            tableMapping.ColumnMappings.Add("PODTYP", "PODTYP"); 
    3765337737            tableMapping.ColumnMappings.Add("wyroznienie", "wyroznienie"); 
     37738            tableMapping.ColumnMappings.Add("reklamaId", "reklamaId"); 
    3765437739            this._adapter.TableMappings.Add(tableMapping); 
    3765537740            this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); 
    3765637741            this._adapter.DeleteCommand.Connection = this.Connection; 
    37657             this._adapter.DeleteCommand.CommandText = "DELETE FROM [FAKTURA_DETAILS] WHERE (([ID_FAKTURA_DETAILS] = @Original_ID_FAKTURA" + 
    37658                 "_DETAILS))"; 
     37742            this._adapter.DeleteCommand.CommandText = "DELETE FROM FAKTURA_DETAILS\r\nWHERE     (ID_FAKTURY = @id_faktury)"; 
    3765937743            this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; 
    37660             this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID_FAKTURA_DETAILS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURA_DETAILS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 
     37744            this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_faktury", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 
    3766137745            this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); 
    3766237746            this._adapter.InsertCommand.Connection = this.Connection; 
    37663             this._adapter.InsertCommand.CommandText = @"INSERT INTO [FAKTURA_DETAILS] ([ID_FAKTURY], [ROK], [MIESIAC], [NAZWA_USLUGI], [SYMBOL_SWW], [JM], [ILOSC], [CENA_JEDN], [UPUST_PR], [UPUST_NETTO], [NETTO], [S_VAT], [VAT], [BRUTTO], [TYTUL], [NR_WYDANIA], [TYP], [PODTYP], [wyroznienie]) VALUES (@ID_FAKTURY, @ROK, @MIESIAC, @NAZWA_USLUGI, @SYMBOL_SWW, @JM, @ILOSC, @CENA_JEDN, @UPUST_PR, @UPUST_NETTO, @NETTO, @S_VAT, @VAT, @BRUTTO, @TYTUL, @NR_WYDANIA, @TYP, @PODTYP, @wyroznienie); 
    37664 SELECT ID_FAKTURA_DETAILS, ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie FROM FAKTURA_DETAILS WHERE (ID_FAKTURA_DETAILS = SCOPE_IDENTITY()) ORDER BY ROK, MIESIAC"; 
     37747            this._adapter.InsertCommand.CommandText = @"INSERT INTO [FAKTURA_DETAILS] ([ID_FAKTURY], [ROK], [MIESIAC], [NAZWA_USLUGI], [SYMBOL_SWW], [JM], [ILOSC], [CENA_JEDN], [UPUST_PR], [UPUST_NETTO], [NETTO], [S_VAT], [VAT], [BRUTTO], [TYTUL], [NR_WYDANIA], [TYP], [PODTYP], [wyroznienie], [reklamaId]) VALUES (@ID_FAKTURY, @ROK, @MIESIAC, @NAZWA_USLUGI, @SYMBOL_SWW, @JM, @ILOSC, @CENA_JEDN, @UPUST_PR, @UPUST_NETTO, @NETTO, @S_VAT, @VAT, @BRUTTO, @TYTUL, @NR_WYDANIA, @TYP, @PODTYP, @wyroznienie, @reklamaId); 
     37748SELECT ID_FAKTURA_DETAILS, ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie, reklamaId FROM FAKTURA_DETAILS WHERE (ID_FAKTURA_DETAILS = SCOPE_IDENTITY()) ORDER BY ROK, MIESIAC"; 
    3766537749            this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; 
    3766637750            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID_FAKTURY", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     
    3768337767            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PODTYP", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PODTYP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
    3768437768            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wyroznienie", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "wyroznienie", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     37769            this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@reklamaId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "reklamaId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
    3768537770            this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); 
    3768637771            this._adapter.UpdateCommand.Connection = this.Connection; 
    37687             this._adapter.UpdateCommand.CommandText = @"UPDATE [FAKTURA_DETAILS] SET [ID_FAKTURY] = @ID_FAKTURY, [ROK] = @ROK, [MIESIAC] = @MIESIAC, [NAZWA_USLUGI] = @NAZWA_USLUGI, [SYMBOL_SWW] = @SYMBOL_SWW, [JM] = @JM, [ILOSC] = @ILOSC, [CENA_JEDN] = @CENA_JEDN, [UPUST_PR] = @UPUST_PR, [UPUST_NETTO] = @UPUST_NETTO, [NETTO] = @NETTO, [S_VAT] = @S_VAT, [VAT] = @VAT, [BRUTTO] = @BRUTTO, [TYTUL] = @TYTUL, [NR_WYDANIA] = @NR_WYDANIA, [TYP] = @TYP, [PODTYP] = @PODTYP, [wyroznienie] = @wyroznienie WHERE (([ID_FAKTURA_DETAILS] = @Original_ID_FAKTURA_DETAILS)); 
    37688 SELECT ID_FAKTURA_DETAILS, ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie FROM FAKTURA_DETAILS WHERE (ID_FAKTURA_DETAILS = @ID_FAKTURA_DETAILS) ORDER BY ROK, MIESIAC"; 
     37772            this._adapter.UpdateCommand.CommandText = @"UPDATE [FAKTURA_DETAILS] SET [ID_FAKTURY] = @ID_FAKTURY, [ROK] = @ROK, [MIESIAC] = @MIESIAC, [NAZWA_USLUGI] = @NAZWA_USLUGI, [SYMBOL_SWW] = @SYMBOL_SWW, [JM] = @JM, [ILOSC] = @ILOSC, [CENA_JEDN] = @CENA_JEDN, [UPUST_PR] = @UPUST_PR, [UPUST_NETTO] = @UPUST_NETTO, [NETTO] = @NETTO, [S_VAT] = @S_VAT, [VAT] = @VAT, [BRUTTO] = @BRUTTO, [TYTUL] = @TYTUL, [NR_WYDANIA] = @NR_WYDANIA, [TYP] = @TYP, [PODTYP] = @PODTYP, [wyroznienie] = @wyroznienie, [reklamaId] = @reklamaId WHERE (([ID_FAKTURA_DETAILS] = @Original_ID_FAKTURA_DETAILS)); 
     37773SELECT ID_FAKTURA_DETAILS, ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie, reklamaId FROM FAKTURA_DETAILS WHERE (ID_FAKTURA_DETAILS = @ID_FAKTURA_DETAILS) ORDER BY ROK, MIESIAC"; 
    3768937774            this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; 
    3769037775            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID_FAKTURY", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     
    3770737792            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PODTYP", global::System.Data.SqlDbType.SmallInt, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PODTYP", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
    3770837793            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wyroznienie", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "wyroznienie", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     37794            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@reklamaId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "reklamaId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
    3770937795            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ID_FAKTURA_DETAILS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURA_DETAILS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 
    3771037796            this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID_FAKTURA_DETAILS", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURA_DETAILS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     
    3771937805        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
    3772037806        private void InitCommandCollection() { 
    37721             this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; 
     37807            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; 
    3772237808            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); 
    3772337809            this._commandCollection[0].Connection = this.Connection; 
    3772437810            this._commandCollection[0].CommandText = @"SELECT     ID_FAKTURA_DETAILS, ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO,  
    37725                       S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie 
     37811                      S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie, reklamaId 
    3772637812FROM         FAKTURA_DETAILS 
    3772737813ORDER BY ROK, MIESIAC"; 
     
    3772937815            this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); 
    3773037816            this._commandCollection[1].Connection = this.Connection; 
    37731             this._commandCollection[1].CommandText = @"SELECT     BRUTTO, CENA_JEDN, ID_FAKTURA_DETAILS, ID_FAKTURY, ILOSC, JM, MIESIAC, NAZWA_USLUGI, NETTO, NR_WYDANIA, PODTYP, ROK,  
    37732                       SYMBOL_SWW, S_VAT, TYP, TYTUL, UPUST_NETTO, UPUST_PR, VAT, wyroznienie 
     37817            this._commandCollection[1].CommandText = "DELETE FROM [FAKTURA_DETAILS] WHERE (id_faktury = @id_faktury)"; 
     37818            this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; 
     37819            this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id_faktury", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); 
     37820            this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); 
     37821            this._commandCollection[2].Connection = this.Connection; 
     37822            this._commandCollection[2].CommandText = @"SELECT     BRUTTO, CENA_JEDN, ID_FAKTURA_DETAILS, ID_FAKTURY, ILOSC, JM, MIESIAC, NAZWA_USLUGI, NETTO, NR_WYDANIA, PODTYP, ROK,  
     37823                      SYMBOL_SWW, S_VAT, TYP, TYTUL, UPUST_NETTO, UPUST_PR, VAT, wyroznienie, reklamaId 
    3773337824FROM         FAKTURA_DETAILS 
    3773437825WHERE     (ID_FAKTURY = @param) 
    3773537826ORDER BY ROK, MIESIAC"; 
    37736             this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; 
    37737             this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@param", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
     37827            this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; 
     37828            this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@param", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ID_FAKTURY", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 
    3773837829        } 
    3773937830         
     
    3776437855        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] 
    3776537856        public virtual int FillByIDFaktury(REKLAMADataSet.FAKTURA_DETAILSDataTable dataTable, global::System.Nullable<int> param) { 
    37766             this.Adapter.SelectCommand = this.CommandCollection[1]; 
     37857            this.Adapter.SelectCommand = this.CommandCollection[2]; 
    3776737858            if ((param.HasValue == true)) { 
    3776837859                this.Adapter.SelectCommand.Parameters[0].Value = ((int)(param.Value)); 
     
    3778237873        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] 
    3778337874        public virtual REKLAMADataSet.FAKTURA_DETAILSDataTable GetDataByIDFaktury(global::System.Nullable<int> param) { 
    37784             this.Adapter.SelectCommand = this.CommandCollection[1]; 
     37875            this.Adapter.SelectCommand = this.CommandCollection[2]; 
    3778537876            if ((param.HasValue == true)) { 
    3778637877                this.Adapter.SelectCommand.Parameters[0].Value = ((int)(param.Value)); 
     
    3782237913        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 
    3782337914        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] 
    37824         public virtual int Delete(int Original_ID_FAKTURA_DETAILS) { 
    37825             this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID_FAKTURA_DETAILS)); 
     37915        public virtual int Delete(global::System.Nullable<int> id_faktury) { 
     37916            if ((id_faktury.HasValue == true)) { 
     37917                this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(id_faktury.Value)); 
     37918            } 
     37919            else { 
     37920                this.Adapter.DeleteCommand.Parameters[0].Value = global::System.DBNull.Value; 
     37921            } 
    3782637922            global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; 
    3782737923            if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)  
     
    3786237958                    global::System.Nullable<short> TYP,  
    3786337959                    global::System.Nullable<short> PODTYP,  
    37864                     global::System.Nullable<bool> wyroznienie) { 
     37960                    global::System.Nullable<bool> wyroznienie,  
     37961                    global::System.Nullable<int> reklamaId) { 
    3786537962            if ((ID_FAKTURY.HasValue == true)) { 
    3786637963                this.Adapter.InsertCommand.Parameters[0].Value = ((int)(ID_FAKTURY.Value)); 
     
    3797638073            else { 
    3797738074                this.Adapter.InsertCommand.Parameters[18].Value = global::System.DBNull.Value; 
     38075            } 
     38076            if ((reklamaId.HasValue == true)) { 
     38077                this.Adapter.InsertCommand.Parameters[19].Value = ((int)(reklamaId.Value)); 
     38078            } 
     38079            else { 
     38080                this.Adapter.InsertCommand.Parameters[19].Value = global::System.DBNull.Value; 
    3797838081            } 
    3797938082            global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; 
     
    3801638119                    global::System.Nullable<short> PODTYP,  
    3801738120                    global::System.Nullable<bool> wyroznienie,  
     38121                    global::System.Nullable<int> reklamaId,  
    3801838122                    int Original_ID_FAKTURA_DETAILS,  
    3801938123                    int ID_FAKTURA_DETAILS) { 
     
    3813238236                this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; 
    3813338237            } 
    38134             this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_ID_FAKTURA_DETAILS)); 
    38135             this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(ID_FAKTURA_DETAILS)); 
     38238            if ((reklamaId.HasValue == true)) { 
     38239                this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(reklamaId.Value)); 
     38240            } 
     38241            else { 
     38242                this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; 
     38243            } 
     38244            this.Adapter.UpdateCommand.Parameters[20].Value = ((int)(Original_ID_FAKTURA_DETAILS)); 
     38245            this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(ID_FAKTURA_DETAILS)); 
    3813638246            global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; 
    3813738247            if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)  
     
    3817338283                    global::System.Nullable<short> PODTYP,  
    3817438284                    global::System.Nullable<bool> wyroznienie,  
     38285                    global::System.Nullable<int> reklamaId,  
    3817538286                    int Original_ID_FAKTURA_DETAILS) { 
    38176             return this.Update(ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie, Original_ID_FAKTURA_DETAILS, Original_ID_FAKTURA_DETAILS); 
     38287            return this.Update(ID_FAKTURY, ROK, MIESIAC, NAZWA_USLUGI, SYMBOL_SWW, JM, ILOSC, CENA_JEDN, UPUST_PR, UPUST_NETTO, NETTO, S_VAT, VAT, BRUTTO, TYTUL, NR_WYDANIA, TYP, PODTYP, wyroznienie, reklamaId, Original_ID_FAKTURA_DETAILS, Original_ID_FAKTURA_DETAILS); 
     38288        } 
     38289         
     38290        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 
     38291        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] 
     38292        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] 
     38293        public virtual int DeleteByIdFaktury(global::System.Nullable<int> id_faktury) { 
     38294            global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; 
     38295            if ((id_faktury.HasValue == true)) { 
     38296                command.Parameters[0].Value = ((int)(id_faktury.Value)); 
     38297            } 
     38298            else { 
     38299                command.Parameters[0].Value = global::System.DBNull.Value; 
     38300            } 
     38301            global::System.Data.ConnectionState previousConnectionState = command.Connection.State; 
     38302            if (((command.Connection.State & global::System.Data.ConnectionState.Open)  
     38303                        != global::System.Data.ConnectionState.Open)) { 
     38304                command.Connection.Open(); 
     38305            } 
     38306            int returnValue; 
     38307            try { 
     38308                returnValue = command.ExecuteNonQuery(); 
     38309            } 
     38310            finally { 
     38311                if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { 
     38312                    command.Connection.Close(); 
     38313                } 
     38314            } 
     38315            return returnValue; 
    3817738316        } 
    3817838317    }