public RadnikPripremaDataSet.RADNIKRow AddRADNIKRow(int iDRADNIK, string sPOJENOPREZIME, string pREZIME, string iME) { RadnikPripremaDataSet.RADNIKRow row = (RadnikPripremaDataSet.RADNIKRow) this.NewRow(); row.ItemArray = new object[] { iDRADNIK, sPOJENOPREZIME, pREZIME, iME }; this.Rows.Add(row); return(row); }
public virtual int FillPage(RadnikPripremaDataSet dataSet, int startRow, int maxRows) { this.Initialize(); this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.RadnikPripremaSet = dataSet; this.rowRADNIK = this.RadnikPripremaSet.RADNIK.NewRADNIKRow(); this.orderString = GetOrderString(this.Order, true); this.reverseOrderString = GetOrderString(this.Order, false); try { this.executePrivate(startRow, maxRows); } finally { this.Cleanup(); } return(0); }
public void executePrivate(int startRow, int maxRows) { this.m_WhereString = " WHERE " + this.filterString + " TM1.[AKTIVAN] = 1"; if (maxRows >= 0) { if (startRow == 0) { this.scmdbuf = "SELECT TOP " + maxRows.ToString() + " TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + ""; } else { string[] strArray = new string[] { " SELECT * FROM ( SELECT TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], ROW_NUMBER() OVER ( ", this.orderString, " ) AS DK_PAGENUM FROM [RADNIK] TM1 ", this.m_WhereString, " ) AS DK_PAGE WHERE DK_PAGENUM BETWEEN ", (startRow + 1).ToString(), " AND ", (startRow + maxRows).ToString() }; this.scmdbuf = string.Concat(strArray); } } else { this.scmdbuf = "SELECT TM1.[IDRADNIK], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + " "; } this.cmRADNIKSelect2 = this.connDefault.GetCommand(this.scmdbuf, false); this.cmRADNIKSelect2.ErrorMask |= ErrorMask.Lock; this.RADNIKSelect2 = this.cmRADNIKSelect2.FetchData(); int num = 0; while (this.cmRADNIKSelect2.HasMoreRows && (num != maxRows)) { this.m_IDRADNIK = this.dsDefault.Db.GetInt32(this.RADNIKSelect2, 0, ref this.m__IDRADNIKIsNull); this.m_PREZIME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 1, ref this.m__PREZIMEIsNull); this.m_IME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 2, ref this.m__IMEIsNull); this.m_AKTIVAN = this.dsDefault.Db.GetBoolean(this.RADNIKSelect2, 3, ref this.m__AKTIVANIsNull); this.m_SPOJENOPREZIME = this.m_PREZIME + " " + this.m_IME; this.rowRADNIK = this.RadnikPripremaSet.RADNIK.NewRADNIKRow(); this.rowRADNIK["IDRADNIK"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IDRADNIKIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IDRADNIK)); this.rowRADNIK.SPOJENOPREZIME = this.m_SPOJENOPREZIME; this.rowRADNIK["PREZIME"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PREZIMEIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PREZIME)); this.rowRADNIK["IME"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IMEIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IME)); this.AddRowRadnik(); num++; this.cmRADNIKSelect2.HasMoreRows = this.RADNIKSelect2.Read(); } this.RADNIKSelect2.Close(); this.Cleanup(); }
public RADNIKRowChangeEvent(RadnikPripremaDataSet.RADNIKRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveRADNIKRow(RadnikPripremaDataSet.RADNIKRow row) { this.Rows.Remove(row); }
public void AddRADNIKRow(RadnikPripremaDataSet.RADNIKRow row) { this.Rows.Add(row); }