Пример #1
0
        protected void uiGridViewCities_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                Label LineName = (Label)e.Row.FindControl("uiLabelLine");

                IStock.BLL.Lines Line = new IStock.BLL.Lines();
                DataRowView row = (DataRowView)e.Row.DataItem;
                Line.LoadByPrimaryKey(Convert.ToInt32(row["LineID"].ToString()));
                LineName.Text = Line.Name;

            }
        }
Пример #2
0
 private void loadDDLs()
 {
     IStock.BLL.Lines Cats = new IStock.BLL.Lines();
     Cats.LoadAll();
     Cats.Sort = "Name";
     uiDropDownListLines.DataSource = Cats.DefaultView;
     uiDropDownListLines.DataTextField = "Name";
     uiDropDownListLines.DataValueField = "LineID";
     uiDropDownListLines.DataBind();
     uiDropDownListLines.Items.Insert(0, new ListItem("إختر الخط",""));
 }