예제 #1
0
        protected void LoadState()
        {
            BusinessLayer.State ObjState = new BusinessLayer.State();
            DataTable           dt       = ObjState.GetAll();

            ViewState["State"] = dt;
        }
예제 #2
0
        protected void LoadStateList()
        {
            BusinessLayer.State ObjState = new BusinessLayer.State();
            DataTable           dt       = ObjState.GetAll();
            DataRow             dr       = dt.NewRow();

            dr["StateId"]   = "0";
            dr["StateName"] = "";
            dt.Rows.InsertAt(dr, 0);
            dt.AcceptChanges();

            dgvState.DataSource = dt;
            dgvState.DataBind();
        }