private void FillDistrictLocation() { _fmsg.vehicle = ddlVehicleNumber.SelectedItem.ToString(); var dsDistrict = _fmsg.GetDistrictLoc(); if (dsDistrict == null) { throw new ArgumentNullException(nameof(dsDistrict)); } lblDistrict.Text = dsDistrict.Tables[0].Rows[0]["District"].ToString(); lblLocation.Text = dsDistrict.Tables[0].Rows[0]["BaseLocation"].ToString(); lblDistrict.ForeColor = Color.ForestGreen; lblLocation.ForeColor = Color.ForestGreen; }
private void FillDistrict() { _fmsg.vehicle = ddlVehicleNumber.SelectedItem.ToString(); var dsDistrict = _fmsg.GetDistrictLoc(); if (dsDistrict == null) { throw new ArgumentNullException(nameof(dsDistrict)); } BindData(); if (dsDistrict.Tables[0].Rows.Count >= 0) { ddlDistricts.Enabled = true; } else { ddlDistricts.Items.FindByText(dsDistrict.Tables[0].Rows[0]["District"].ToString()).Selected = true; } }