/// <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_Cus_LngID">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_tblCustomer_Record.WSInt32 PK_Cus_LngID, int startRecord, int maxRecords)
        {
            System.Data.DataSet dataSet = null;
            dataSet = tblCustomer_RecordWebService.GetAllDisplay_tblCustomer_Collection_DataSet();

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

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

            this.bindingInProgress = false;

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

            this.EndUpdate();
        }
        /// <summary>
        /// Load or reloads all the table content. You can specify which records 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_Cus_LngID">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(WS_tblCustomer_Record.WSInt32[] ArrayOf_PK_Cus_LngID, int startRecord, int maxRecords)
        {
            System.Data.DataSet dataSet = null;
            dataSet = tblCustomer_RecordWebService.GetAllDisplay_tblCustomer_Collection_DataSet();

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

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

            this.bindingInProgress = false;

            System.Data.DataView dataView = dataSet.Tables["spS_tblCustomer_Display"].DefaultView;

            if (ArrayOf_PK_Cus_LngID != null && ArrayOf_PK_Cus_LngID.Length > 0)
            {
                this.SetRecordsCheckState(ArrayOf_PK_Cus_LngID, System.Windows.Forms.CheckState.Checked);
            }
            else
            {
                base.OnSelectedIndexChanged(EventArgs.Empty);
            }
            this.EndUpdate();
        }
Пример #3
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_Cus_LngID">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_tblCustomer_Record.WSInt32 PK_Cus_LngID, int startRecord, int maxRecords)
        {
            if (!PK_Cus_LngID.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_Cus_LngID");
            }

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


            System.Data.DataSet dataSet = null;
            dataSet = tblCustomer_RecordWebService.GetAllDisplay_tblCustomer_Collection_DataSet();

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

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

            this.bindingInProgress = false;

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

            this.EndUpdate();
        }