コード例 #1
0
 public PregledRadnikaSvihDataSet.RADNIKRow AddRADNIKRow(int iDRADNIK, string jMBG, string pREZIME, string iME, bool aKTIVAN, string oPCINASTANOVANJAIDOPCINE, int iDORGDIO, string oIB, decimal uKUPNIFAKTOR)
 {
     PregledRadnikaSvihDataSet.RADNIKRow row = (PregledRadnikaSvihDataSet.RADNIKRow) this.NewRow();
     row.ItemArray = new object[] { iDRADNIK, jMBG, pREZIME, iME, aKTIVAN, oPCINASTANOVANJAIDOPCINE, iDORGDIO, oIB, uKUPNIFAKTOR };
     this.Rows.Add(row);
     return(row);
 }
コード例 #2
0
 public virtual int FillPage(PregledRadnikaSvihDataSet dataSet, int startRow, int maxRows)
 {
     this.Initialize();
     this.connDefault           = this.dsDefault.GetReadWriteConnection(this.daCurrentTransaction);
     this.PregledRadnikaSvihSet = dataSet;
     this.rowRADNIK             = this.PregledRadnikaSvihSet.RADNIK.NewRADNIKRow();
     this.orderString           = GetOrderString(this.Order, true);
     this.reverseOrderString    = GetOrderString(this.Order, false);
     try
     {
         this.executePrivate(startRow, maxRows);
     }
     finally
     {
         this.Cleanup();
     }
     return(0);
 }
コード例 #3
0
 public void RemoveRADNIKRow(PregledRadnikaSvihDataSet.RADNIKRow row)
 {
     this.Rows.Remove(row);
 }
コード例 #4
0
 public void AddRADNIKRow(PregledRadnikaSvihDataSet.RADNIKRow row)
 {
     this.Rows.Add(row);
 }
コード例 #5
0
 public RADNIKRowChangeEvent(PregledRadnikaSvihDataSet.RADNIKRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
コード例 #6
0
        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], TM1.[IDORGDIO], TM1.[OIB] FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + "";
                }
                else
                {
                    if (string.Compare(this.m_WhereString.TrimEnd(new char[] { ' ' }), "".TrimEnd(new char[] { ' ' }), false, CultureInfo.CurrentCulture) == 0)
                    {
                        this.sWhereSep = " WHERE ";
                    }
                    else
                    {
                        this.sWhereSep = " AND ";
                    }
                    int internalRecordCount = this.GetInternalRecordCount();
                    this.m_TopRowCount = Conversions.ToInteger(Interaction.IIf(internalRecordCount >= (startRow + maxRows), maxRows, RuntimeHelpers.GetObjectValue(Interaction.IIf(internalRecordCount >= startRow, internalRecordCount - startRow, 0))));
                    if (this.m_TopRowCount == 0)
                    {
                        return;
                    }
                    this.scmdbuf = "SELECT TM1.[IDRADNIK], TM1.[JMBG], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], TM1.[OPCINASTANOVANJAIDOPCINE], TM1.[IDORGDIO], TM1.[OIB] FROM [RADNIK] TM1 WHERE TM1.[IDRADNIK] IN ( SELECT TOP " + maxRows.ToString() + " TM1.[IDRADNIK]  FROM [RADNIK] TM1" + this.m_WhereString + "" + this.sWhereSep + "TM1.[IDRADNIK] NOT IN ( SELECT TOP " + startRow.ToString() + " TM1.[IDRADNIK]  FROM [RADNIK] TM1" + this.m_WhereString + "" + this.orderString + ")" + this.orderString + ")" + this.orderString + "";
                }
            }
            else
            {
                this.scmdbuf = "SELECT TM1.[IDRADNIK], TM1.[JMBG], TM1.[PREZIME], TM1.[IME], TM1.[AKTIVAN], TM1.[OPCINASTANOVANJAIDOPCINE], TM1.[IDORGDIO], TM1.[OIB] 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_IDORGDIO            = this.dsDefault.Db.GetInt32(this.RADNIKSelect2, 6, ref this.m__IDORGDIOIsNull);
                this.m_OIB                 = this.dsDefault.Db.GetString(this.RADNIKSelect2, 7, ref this.m__OIBIsNull);
                this.m_UKUPNIFAKTOR        = placa.UkupnoFaktorOO(this.m_IDRADNIK, Configuration.ConnectionString.ToString());
                this.rowRADNIK             = this.PregledRadnikaSvihSet.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["IDORGDIO"]  = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IDORGDIOIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IDORGDIO));
                this.rowRADNIK["OIB"]       = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__OIBIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_OIB));
                this.rowRADNIK.UKUPNIFAKTOR = this.m_UKUPNIFAKTOR;
                this.AddRowRadnik();
                num++;
                this.cmRADNIKSelect2.HasMoreRows = this.RADNIKSelect2.Read();
            }
            this.RADNIKSelect2.Close();
            this.Cleanup();
        }