private void PopulateFields(string _formno) { foreach (DataRow dr in ClsPEZAData.Get8105DataByFormNo(_formno).Rows) { tbPEZAFormNumber.Text = dr[0].ToString().Trim(); datePEZA.SelectedDate = Convert.ToDateTime(dr[1]); tbZoneEntName.Text = dr[15].ToString().Trim(); tbZoneEntRegNo.Text = dr[16].ToString().Trim(); tbPEZAcontrolNo.Text = dr[14].ToString().Trim(); tbEcoZoneName.Text = dr[19].ToString(); tbPurpose.Text = dr[2].ToString().Trim(); cboCurrency.Text = dr[3].ToString().Trim(); cboCustomer.SelectedValue = Convert.ToInt16(dr[25]); tbAddress.Text = dr[5].ToString(); tbInternalRevenueTax.Text = dr[6].ToString(); dateOfDelivery.SelectedDate = Convert.ToDateTime(dr[7]); tbCarrier.Text = dr[8].ToString(); tbCountryOfOrigin.Text = dr[9].ToString(); dateImported.SelectedDate = Convert.ToDateTime(dr[12]); tbImportPrice.Text = dr[10].ToString(); tbDutiesNtaxesPaid.Text = dr[11].ToString(); cboSKPIAuthorizedSignatory.SelectedValue = dr[17].ToString(); tbSKPIPosition.Text = dr[18].ToString(); cboAuthorizedOfficial1.SelectedValue = dr[20].ToString(); cboAuthorizedOfficial2.SelectedValue = dr[21].ToString(); } FillItems(_formno); FillReturnables(_formno); }