コード例 #1
0
        internal static void LoadPerfil(ExcelWorksheet ws, Orb OrbEffect)
        {
            var start = ws.Dimension.Start;
            var end   = ws.Dimension.End;

            for (int row = start.Row + 1; row <= end.Row; row++)
            {
                string UK              = ws.Cells[row, 1].Text;
                string Nome            = ws.Cells[row, 2].Text;
                string Descricao       = ws.Cells[row, 3].Text;
                string Action          = ws.Cells[row, 4].Text;
                string Controller      = ws.Cells[row, 5].Text;
                string UsuarioInclusao = ws.Cells[row, 6].Text;

                OrbEffect.CadastrarPerfil(new GISModel.Entidades.Perfil()
                {
                    UniqueKey         = Guid.Parse(UK),
                    Nome              = Nome,
                    Descricao         = Descricao,
                    ActionDefault     = Action,
                    ControllerDefault = Controller,
                    UsuarioInclusao   = UsuarioInclusao
                });
            }
        }