Exemple #1
0
 protected void btDeletar_Click(object sender, EventArgs e)
 {
     try
     {
         var list = gridUsuario.GetSelectedFieldValues("Codigo");
         if (list.Count > 0)
         {
             MetodosPontoFrequencia.HorasExtras.PermissoesDAO pdo = new MetodosPontoFrequencia.HorasExtras.PermissoesDAO();
             pdo.DeletarPermissoes(list);
         }
     }
     catch { }
     finally
     {
         GetDados();
     }
 }
Exemple #2
0
    private void GetDados()
    {
        MetodosPontoFrequencia.HorasExtras.PermissoesDAO pdo = new MetodosPontoFrequencia.HorasExtras.PermissoesDAO();
        string strSetor = "";

        try
        {
            strSetor = cbSetor.Value.ToString();
        }
        catch { }
        gridUsuario.DataSource = pdo.GetPermissoes(Session["IDEmpresa"].ToString(), strSetor, txtNome.Text, txtMatricula.Text);
        gridUsuario.DataBind();
        if (gridUsuario.Columns.IndexOf(gridUsuario.Columns["Deletar"]) == -1)
        {
            GridViewCommandColumn col = new GridViewCommandColumn();
            col.ShowSelectCheckbox = true;
            col.Name  = "Deletar";
            col.Index = 0;
            gridUsuario.Columns.Add(col);
        }
    }
Exemple #3
0
    protected void btNovo_Click(object sender, EventArgs e)
    {
        var list = gridUsuario.GetSelectedFieldValues("Codigo");

        if (list.Count > 0)
        {
            MetodosPontoFrequencia.HorasExtras.PermissoesDAO pdo = new MetodosPontoFrequencia.HorasExtras.PermissoesDAO();
            string dataFim = "";
            try
            {
                dataFim = deDataFim.Value.ToString();
            }
            catch { }
            pdo.IncluirPermissoes(list, deDataInicio.Value.ToString(), dataFim, Session["IDUsuario"].ToString());
            LimpaControles();
        }
        else
        {
            Mensagem("Seleciona um colaborador!");
        }
    }