Example #1
0
 public trazi_partneraDataSet.PARTNERRow AddPARTNERRow(int iDPARTNER, string nAZIVPARTNER, string pARTNERMJESTO, string pARTNEREMAIL, string pARTNERULICA, string mB, string pARTNEROIB, string pT)
 {
     trazi_partneraDataSet.PARTNERRow row = (trazi_partneraDataSet.PARTNERRow) this.NewRow();
     row.ItemArray = new object[] { iDPARTNER, nAZIVPARTNER, pARTNERMJESTO, pARTNEREMAIL, pARTNERULICA, mB, pARTNEROIB, pT };
     this.Rows.Add(row);
     return(row);
 }
Example #2
0
 public void RemovePARTNERRow(trazi_partneraDataSet.PARTNERRow row)
 {
     this.Rows.Remove(row);
 }
Example #3
0
 public PARTNERRowChangeEvent(trazi_partneraDataSet.PARTNERRow row, DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }
Example #4
0
 public void AddPARTNERRow(trazi_partneraDataSet.PARTNERRow row)
 {
     this.Rows.Add(row);
 }
Example #5
0
        public void executePrivate(int startRow, int maxRows)
        {
            this.m_WhereString = " WHERE " + this.filterString + "  TM1.[NAZIVPARTNER] like '%' + @NAZIVPARTNER + '%'";
            if (maxRows >= 0)
            {
                if (startRow == 0)
                {
                    this.scmdbuf = "SELECT TOP " + maxRows.ToString() + "  TM1.[IDPARTNER], TM1.[NAZIVPARTNER], TM1.[PARTNERMJESTO], TM1.[PARTNEREMAIL], TM1.[PARTNERULICA], TM1.[MB], TM1.[PARTNEROIB] FROM [PARTNER] 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.AV8NAZIVPA);
                    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.[IDPARTNER], TM1.[NAZIVPARTNER], TM1.[PARTNERMJESTO], TM1.[PARTNEREMAIL], TM1.[PARTNERULICA], TM1.[MB], TM1.[PARTNEROIB] FROM [PARTNER] TM1 WHERE TM1.[IDPARTNER] IN ( SELECT TOP " + maxRows.ToString() + " TM1.[IDPARTNER]  FROM [PARTNER] TM1" + this.m_WhereString + "" + this.sWhereSep + "TM1.[IDPARTNER] NOT IN ( SELECT TOP " + startRow.ToString() + " TM1.[IDPARTNER]  FROM [PARTNER] TM1" + this.m_WhereString + "" + this.orderString + ")" + this.orderString + ")" + this.orderString + "";
                }
            }
            else
            {
                this.scmdbuf = "SELECT TM1.[IDPARTNER], TM1.[NAZIVPARTNER], TM1.[PARTNERMJESTO], TM1.[PARTNEREMAIL], TM1.[PARTNERULICA], TM1.[MB], TM1.[PARTNEROIB] FROM [PARTNER] TM1" + this.m_WhereString + "" + this.orderString + " ";
            }
            this.cmPARTNERSelect2 = this.connDefault.GetCommand(this.scmdbuf, false);
            if (this.cmPARTNERSelect2.IDbCommand.Parameters.Count == 0)
            {
                this.cmPARTNERSelect2.IDbCommand.Parameters.Add(this.dsDefault.GetDbParameter("@NAZIVPARTNER", DbType.String, 100));
            }
            this.lV8NAZIVPA = StringUtil.PadRight(StringUtil.RTrim(this.AV8NAZIVPA), 100, "%");
            this.cmPARTNERSelect2.SetParameter(0, this.lV8NAZIVPA);
            this.cmPARTNERSelect2.ErrorMask |= ErrorMask.Lock;
            this.PARTNERSelect2              = this.cmPARTNERSelect2.FetchData();
            int num = 0;

            while (this.cmPARTNERSelect2.HasMoreRows && (num != maxRows))
            {
                this.m_IDPARTNER                 = this.dsDefault.Db.GetInt32(this.PARTNERSelect2, 0, ref this.m__IDPARTNERIsNull);
                this.m_NAZIVPARTNER              = this.dsDefault.Db.GetString(this.PARTNERSelect2, 1, ref this.m__NAZIVPARTNERIsNull).TrimEnd(new char[] { ' ' });
                this.m_PARTNERMJESTO             = this.dsDefault.Db.GetString(this.PARTNERSelect2, 2, ref this.m__PARTNERMJESTOIsNull);
                this.m_PARTNEREMAIL              = this.dsDefault.Db.GetString(this.PARTNERSelect2, 3, ref this.m__PARTNEREMAILIsNull);
                this.m_PARTNERULICA              = this.dsDefault.Db.GetString(this.PARTNERSelect2, 4, ref this.m__PARTNERULICAIsNull);
                this.m_MB                        = this.dsDefault.Db.GetString(this.PARTNERSelect2, 5, ref this.m__MBIsNull);
                this.m_PARTNEROIB                = this.dsDefault.Db.GetString(this.PARTNERSelect2, 6, ref this.m__PARTNEROIBIsNull);
                this.m_PT                        = this.m_NAZIVPARTNER + " | " + NumberUtil.ToString((long)this.m_IDPARTNER, "");
                this.rowPARTNER                  = this.trazi_partneraSet.PARTNER.NewPARTNERRow();
                this.rowPARTNER["IDPARTNER"]     = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__IDPARTNERIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_IDPARTNER));
                this.rowPARTNER["NAZIVPARTNER"]  = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__NAZIVPARTNERIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_NAZIVPARTNER));
                this.rowPARTNER["PARTNERMJESTO"] = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PARTNERMJESTOIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PARTNERMJESTO));
                this.rowPARTNER["PARTNEREMAIL"]  = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PARTNEREMAILIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PARTNEREMAIL));
                this.rowPARTNER["PARTNERULICA"]  = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PARTNERULICAIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PARTNERULICA));
                this.rowPARTNER["MB"]            = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__MBIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_MB));
                this.rowPARTNER["PARTNEROIB"]    = RuntimeHelpers.GetObjectValue(Interaction.IIf(this.m__PARTNEROIBIsNull, RuntimeHelpers.GetObjectValue(Convert.DBNull), this.m_PARTNEROIB));
                this.rowPARTNER.PT               = this.m_PT;
                this.AddRowPartner();
                num++;
                this.cmPARTNERSelect2.HasMoreRows = this.PARTNERSelect2.Read();
            }
            this.PARTNERSelect2.Close();
            this.Cleanup();
        }