Exemplo n.º 1
0
        protected void RadTreeList1_InsertCommand(object sender, TreeListCommandEventArgs e)
        {
            Hashtable            table = new Hashtable();
            TreeListEditableItem item  = e.Item as TreeListEditableItem;

            item.ExtractValues(table);
            CoCauToChuc obj          = new CoCauToChuc();
            RadComboBox cbocaptochuc = (RadComboBox)item.FindControl("cboCapToChuc");

            obj.IDCapToChuc = Convert.ToInt32(cbocaptochuc.SelectedValue);
            obj.NgayTao     = obj.NgayCapNhat = DateTime.Now;
            obj.NguoiTao    = obj.NguoiCapNhat = idUser;
            item.UpdateValues(obj);
            _entities.AddToCoCauToChucs(obj);
            _entities.SaveChanges();
        }