private void FillSectorData()
 {
     uiLabelDate.Text = CurrentSector.SectorDate.ToString("dd/MM/yyyy");
     AirPort from = new AirPort();
     from.LoadByPrimaryKey(CurrentSector.From_AirportID);
     AirPort to = new AirPort();
     to.LoadByPrimaryKey(CurrentSector.To_AirportID);
     uiLabelFrom.Text = from.IATACode;
     uiLabelTo.Text = to.IATACode;
     uiLabelNO.Text = CurrentSector.FlightNo;
 }
Beispiel #2
0
        protected void uiGridViewSectors_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                DataRowView objData = (DataRowView)e.Row.DataItem;
                AirPort From = new AirPort();
                AirPort To = new AirPort();
                From.LoadByPrimaryKey(Convert.ToInt32(objData["From_AirportID"].ToString()));
                To.LoadByPrimaryKey(Convert.ToInt32(objData["To_AirportID"].ToString()));
                Label temp = (Label)e.Row.FindControl("uiLabelFrom");
                temp.Text = From.IATACode;
                Label temp2 = (Label)e.Row.FindControl("uiLabelTo");
                temp2.Text = To.IATACode;

            }
        }