Example #1
0
    protected void lnkAddLeaveAsssignedByRole_Click(object sender, EventArgs e)
    {
        int           roleId         = Convert.ToInt32(ddlRole.SelectedValue);
        int           leaveId        = Convert.ToInt32(ddlLeave.SelectedValue);
        int           noOfLeaves     = Convert.ToInt32(txtNoOfLeaves.Text);
        int           isPromoted     = Convert.ToInt32(ddlIsPromoted.SelectedValue);
        MasterEntries objMasterEntry = new MasterEntries();
        int           count          = objMasterEntry.Count(roleId, leaveId);

        if (count == 0)
        {
            objMasterEntry.LeaveAssignedByRole(leaveId, roleId, noOfLeaves, isPromoted);
        }
        grdLeaveAssignByRoleBind();
    }
    protected void lnkAddLeaveAsssignedByRole_Click(object sender, EventArgs e)
    {

        int roleId = Convert.ToInt32(ddlRole.SelectedValue);
        int leaveId = Convert.ToInt32(ddlLeave.SelectedValue);
        int noOfLeaves = Convert.ToInt32(txtNoOfLeaves.Text);
        int isPromoted = Convert.ToInt32(ddlIsPromoted.SelectedValue);
        MasterEntries objMasterEntry = new MasterEntries();
        int count = objMasterEntry.Count(roleId, leaveId);
        if (count == 0)
            objMasterEntry.LeaveAssignedByRole(leaveId, roleId, noOfLeaves, isPromoted);
        grdLeaveAssignByRoleBind();
    }