private void ShowRecsDataGrid() { clsPOSDB dp = new clsPOSDB(); DPDetails[] dpInfo = dp.GetAllDeliveryPoint(); if (dpInfo != null) { dgvDeliveryPoints.DataSource = dpInfo; dgvDeliveryPoints.CaptionText = "Delivery Points :: Records(" + dpInfo.Length.ToString() + ")"; } else { dgvDeliveryPoints.CaptionText += " :: No Records Found"; } }
//Returns All Record private void ShowAllRecords() { this.Cursor = Cursors.WaitCursor; clsPOSDB dp = new clsPOSDB(); dpInfo = dp.GetAllDeliveryPoint(); int recPos = this.BindingContext[dpInfo].Position; if (dpInfo != null) { txtDeliveryPointId.Text = dpInfo[recPos].DeliveryPointId.ToString(); txtDeliveryPointName.Text = dpInfo[recPos].DeliveryPointName; txtDeliveryPointAddress.Text = dpInfo[recPos].DeliveryPointAddress; } else { //FrmMain.statusBarMain.Text = "Record Not Found"; } this.Cursor = Cursors.Default; }