public PregledRadnikaDataSet.RADNIKRow AddRADNIKRow(int iDRADNIK, string jMBG, string pREZIME, string iME, bool aKTIVAN, string oPCINASTANOVANJAIDOPCINE, string sPOJENOPREZIME) { PregledRadnikaDataSet.RADNIKRow row = (PregledRadnikaDataSet.RADNIKRow) this.NewRow(); row.ItemArray = new object[] { iDRADNIK, jMBG, pREZIME, iME, aKTIVAN, oPCINASTANOVANJAIDOPCINE, sPOJENOPREZIME }; this.Rows.Add(row); return(row); }
public void executePrivate(int startRow, int maxRows) { this.m_WhereString = "" + this.filterString + " "; if (maxRows >= 0) { if (startRow == 0) { this.scmdbuf = "SELECT TOP " + maxRows.ToString() + " TM1.[IDRADNIK], TM1.[JMBG], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], TM1.[OPCINASTANOVANJAIDOPCINE] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + ""; } else { string[] strArray = new string[] { " SELECT * FROM ( SELECT TM1.[IDRADNIK], TM1.[JMBG], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], TM1.[OPCINASTANOVANJAIDOPCINE], 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.[JMBG], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], TM1.[OPCINASTANOVANJAIDOPCINE] 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_JMBG = this.dsDefault.Db.GetString(this.RADNIKSelect2, 1, ref this.m__JMBGIsNull); this.m_PREZIME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 2, ref this.m__PREZIMEIsNull); this.m_IME = this.dsDefault.Db.GetString(this.RADNIKSelect2, 3, ref this.m__IMEIsNull); this.m_AKTIVAN = this.dsDefault.Db.GetBoolean(this.RADNIKSelect2, 4, ref this.m__AKTIVANIsNull); this.m_OPCINASTANOVANJAIDOPCINE = this.dsDefault.Db.GetString(this.RADNIKSelect2, 5, ref this.m__OPCINASTANOVANJAIDOPCINEIsNull); this.m_SPOJENOPREZIME = this.m_PREZIME + " " + this.m_IME; this.rowRADNIK = this.PregledRadnikaSet.RADNIK.NewRADNIKRow(); this.rowRADNIK["IDRADNIK"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IDRADNIKIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IDRADNIK)); this.rowRADNIK["JMBG"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__JMBGIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_JMBG)); 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.rowRADNIK["AKTIVAN"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__AKTIVANIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_AKTIVAN)); this.rowRADNIK["OPCINASTANOVANJAIDOPCINE"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__OPCINASTANOVANJAIDOPCINEIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_OPCINASTANOVANJAIDOPCINE)); this.rowRADNIK.SPOJENOPREZIME = this.m_SPOJENOPREZIME; this.AddRowRadnik(); num++; this.cmRADNIKSelect2.HasMoreRows = this.RADNIKSelect2.Read(); } this.RADNIKSelect2.Close(); this.Cleanup(); }
public virtual int FillPage(PregledRadnikaDataSet dataSet, int startRow, int maxRows) { this.Initialize(); this.connDefault = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction); this.PregledRadnikaSet = dataSet; this.rowRADNIK = this.PregledRadnikaSet.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 RADNIKRowChangeEvent(PregledRadnikaDataSet.RADNIKRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveRADNIKRow(PregledRadnikaDataSet.RADNIKRow row) { this.Rows.Remove(row); }
public void AddRADNIKRow(PregledRadnikaDataSet.RADNIKRow row) { this.Rows.Add(row); }