using System;
using System.Data;
/****************************************************************************************************************************
* Project Name    : TimeCheck                    Started Date  : 18-July-2007
* Module          : Leave Application            Last Modified : 29-Aug-2007
* Programmer      : Prabakaran.P
* Current Storage : \\Angler56\Projects\Inprogress\SCREEN1206\code\Time_AttendanceApp
* BackUp          :
****************************************************************************************************************************/
public partial class Masters_AjaxLeavePolicy : Base.BasePage
{
    DataSet dsleavePolicy = new DataSet();
    LeaveEventData objLeaveEventData = new LeaveEventData();
    int EmployeeCategory;
    int EmployeeType;
    string Gender;
    int Religion;
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking and reset date format
        base.Page_Load(sender, e);
        if (!IsPostBack)
        {
            int levelId;
            try
            {
                EmployeeCategory = Convert.ToInt32(Request.QueryString["EmployeeCategory"]);
                EmployeeType = Convert.ToInt32(Request.QueryString["EmployeeType"]);
                Gender = Convert.ToString(Request.QueryString["Gender"]);
                Religion = Convert.ToInt32(Request.QueryString["Religion"]);
                dsleavePolicy = objLeaveEventData.SelectLeavePolicyDetailsBasedOnFilter(EmployeeCategory, EmployeeType, Gender, Religion);
                dsleavePolicy.Tables[0].TableName = "Details";
                if (dsleavePolicy.Tables["Details"].Rows.Count > 0)
                {
                    Response.Clear();
                    Response.ContentType = "text/xml";
                    Response.Write(dsleavePolicy.GetXml());
                    dsleavePolicy.Dispose();
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            Response.End();
        }
    }
}
