コード例 #1
0
        /// <summary>
        /// Load or reloads a subset of the table content. You can specify which record you want to be selected
        /// by default. In order to successfully call this method, you need to call first the Initialize method.
        /// </summary>
        /// <param name="PK_Sup_GuidID">Primary key of the record you want to be selected by default.</param>
        /// <param name="startRecord">The zero-based record number to start with.</param>
        /// <param name="maxRecords">The maximum number of records to retrieve.</param>
        public void RefreshData(WS_Supplier.WSGuid PK_Sup_GuidID, int startRecord, int maxRecords)
        {
            System.Data.DataSet dataSet = null;
            dataSet = supplierWebService.GetAllDisplay_Suppliers_DataSet();

            this.BeginUpdate();
            this.bindingInProgress = true;

            this.DataSource    = dataSet.Tables["spS_tblSupplier_Display"].DefaultView;
            this.ValueMember   = "ID1";
            this.DisplayMember = "Display";

            this.bindingInProgress = false;

            if (!PK_Sup_GuidID.UseNull)
            {
                this.SelectedValue = PK_Sup_GuidID.Value;
            }
            else
            {
                base.OnSelectedIndexChanged(EventArgs.Empty);
            }

            this.EndUpdate();
        }
コード例 #2
0
        /// <summary>
        /// Load or reloads a subset of the table content. In order to successfully call this method, you need to call first
        /// the Initialize method.
        /// </summary>
        /// <param name="startRecord">The zero-based record number to start with.</param>
        /// <param name="maxRecords">The maximum number of records to retrieve.</param>
        public void RefreshData(int startRecord, int maxRecords)
        {
            WS_Supplier.WSGuid nullValue = new WS_Supplier.WSGuid();
            nullValue.UseNull = true;

            this.RefreshData(nullValue, startRecord, maxRecords);
        }
コード例 #3
0
        /// <summary>
        /// Load or reloads all the table content. In order to successfully call this method,
        /// you need to call first the Initialize method.
        /// </summary>
        public void RefreshData()
        {
            WS_Supplier.WSGuid nullValue = new WS_Supplier.WSGuid();
            nullValue.UseNull = true;

            this.RefreshData(nullValue, -1, -1);
        }
コード例 #4
0
        /// <summary>
        /// Load or reloads a subset of the table content. You can specify which record you want to be checked by default.
        /// In order to successfully call this method, you need to call first the Initialize method.
        /// </summary>
        /// <param name="ArrayOf_PK_Sup_GuidID">Primary keys of the records you want to be checked by default.</param>
        /// <param name="startRecord">The zero-based record number to start with.</param>
        /// <param name="maxRecords">The maximum number of records to retrieve.</param>
        public void RefreshData(System.Collections.ArrayList ArrayOf_PK_Sup_GuidID, int startRecord, int maxRecords)
        {
            if (ArrayOf_PK_Sup_GuidID != null && ArrayOf_PK_Sup_GuidID.Count > 0)
            {
                WS_Supplier.WSGuid[] typedArray = new WS_Supplier.WSGuid[ArrayOf_PK_Sup_GuidID.Count];
                int index = 0;
                foreach (object item in ArrayOf_PK_Sup_GuidID)
                {
                    if (item is WS_Supplier.WSGuid)
                    {
                        typedArray[index] = (WS_Supplier.WSGuid)item;
                        index++;
                    }
                    else if (item is System.Data.SqlTypes.SqlGuid)
                    {
                        WS_Supplier.WSGuid value = new WS_Supplier.WSGuid();
                        value.UseNull = false;
                        value.Value   = ((System.Data.SqlTypes.SqlGuid)item).Value;

                        typedArray[index] = value;
                        index++;
                    }
                    else if (item is System.Guid)
                    {
                        WS_Supplier.WSGuid value = new WS_Supplier.WSGuid();
                        value.UseNull = false;
                        value.Value   = (System.Guid)item;

                        typedArray[index] = value;
                        index++;
                    }
                    else
                    {
                        throw new InvalidOperationException("ArrayOf_PK_Sup_GuidID does not contain ONLY System.Data.SqlTypes.SqlGuid, WS_Supplier.WSGuid or System.Guid elements.");
                    }
                }
                this.RefreshData(typedArray, startRecord, maxRecords);
            }
            else
            {
                this.RefreshData(startRecord, maxRecords);
            }
        }
コード例 #5
0
        /// <summary>
        /// Sets the supplied collection records to a System.Windows.Forms.CheckState value.
        /// </summary>
        /// <param name="ArrayOf_PK_Sup_GuidID">Primary keys of the records to set the check state for.</param>
        /// <param name="value">One of the System.Windows.Forms.CheckState values.</param>
        public void SetRecordsCheckState(System.Collections.ArrayList ArrayOf_PK_Sup_GuidID, System.Windows.Forms.CheckState value)
        {
            if (ArrayOf_PK_Sup_GuidID != null && ArrayOf_PK_Sup_GuidID.Count > 0)
            {
                WS_Supplier.WSGuid[] typedArray = new WS_Supplier.WSGuid[ArrayOf_PK_Sup_GuidID.Count];
                int index = 0;
                foreach (object item in ArrayOf_PK_Sup_GuidID)
                {
                    if (item is WS_Supplier.WSGuid)
                    {
                        typedArray[index] = (WS_Supplier.WSGuid)item;
                        index++;
                    }
                    else if (item is System.Data.SqlTypes.SqlGuid)
                    {
                        WS_Supplier.WSGuid record = new WS_Supplier.WSGuid();
                        record.UseNull = false;
                        record.Value   = ((System.Data.SqlTypes.SqlGuid)item).Value;

                        typedArray[index] = record;
                        index++;
                    }
                    else if (item is System.Guid)
                    {
                        WS_Supplier.WSGuid record = new WS_Supplier.WSGuid();
                        record.UseNull = false;
                        record.Value   = (System.Guid)item;

                        typedArray[index] = record;
                        index++;
                    }
                    else
                    {
                        throw new InvalidOperationException("ArrayOf_PK_Sup_GuidID does not contain ONLY System.Data.SqlTypes.SqlGuid, WS_Supplier.WSGuid or System.Guid elements.");
                    }
                }
                this.SetRecordsCheckState(typedArray, value);
            }
        }
コード例 #6
0
        /// <summary>
        /// Load or reloads a subset of the table content. You can specify which record you want to be selected
        /// by default. In order to successfully call this method, you need to call first the Initialize method.
        /// </summary>
        /// <param name="PK_Sup_GuidID">Primary key of the record you want to be selected by default.</param>
        /// <param name="startRecord">The zero-based record number to start with.</param>
        /// <param name="maxRecords">The maximum number of records to retrieve.</param>
        public void RefreshData(WS_Supplier.WSGuid PK_Sup_GuidID, int startRecord, int maxRecords)
        {
            if (!PK_Sup_GuidID.UseNull && this.SelectionMode == System.Windows.Forms.SelectionMode.None)
            {
                throw new ArgumentException("You cannot supply a value to this parameter when SelectionMode property is set to None.", "PK_Sup_GuidID");
            }

            if (this.networkCredential == null)
            {
                throw new InvalidOperationException("You must call the 'Initialize' method before calling this method.");
            }


            System.Data.DataSet dataSet = null;
            dataSet = supplierWebService.GetAllDisplay_Suppliers_DataSet();

            this.BeginUpdate();
            this.bindingInProgress = true;

            this.DataSource    = dataSet.Tables["spS_tblSupplier_Display"].DefaultView;
            this.ValueMember   = "ID1";
            this.DisplayMember = "Display";

            this.bindingInProgress = false;

            if (!PK_Sup_GuidID.UseNull)
            {
                this.SelectedValue = PK_Sup_GuidID.Value;
            }
            else
            {
                base.OnSelectedIndexChanged(EventArgs.Empty);
            }

            this.EndUpdate();
        }
コード例 #7
0
 /// <summary>
 /// Load or reloads all the table content. You can specify which record you want to be selected by default.
 /// In order to successfully call this method, you need to call first the Initialize method.
 /// </summary>
 /// <param name="PK_Sup_GuidID">Primary key of the record you want to be selected by default.</param>
 public void RefreshData(WS_Supplier.WSGuid PK_Sup_GuidID)
 {
     this.RefreshData(PK_Sup_GuidID, -1, -1);
 }