using System;
using System.Data;
/****************************************************************************************************************************
* Project Name    : TimeCheck                                        Created On  : 12-Aug-2007
* Module          : Employee Master                                  Modified On : 21-July-2007
* Created By      : Arun Vinoth.T
* Modified By     : 
* Current Storage : \\Angler56\Projects\Inprogress\SCREEN1206\code\Time_AttendanceApp
* BackUp          :
****************************************************************************************************************************/
public partial class Masters_EmployeeRemote : Base.BasePage
{
    EmployeeEventData objEmployee = new EmployeeEventData();
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking and reset date format
        base.Page_Load(sender, e);
        if (!IsPostBack)
        {
            if (Request.QueryString["ID"].ToString() != "Select" && Request.QueryString["ID"].ToString() != "" && Request.QueryString["ID"].ToString() != null)
            {
                int LevelID = Convert.ToInt32(Request.QueryString["ID"].ToString());
                //LevelID = Convert.ToInt32(Session["parentLevelId"]);
                if (Convert.ToInt32(Session["parentLevelId"]) == 0)
                {
                    Session["parentLevelId"] = LevelID;
                }
                getData(LevelID);
            }
            //else
            //{
            //    Response.Clear();
            //    //Response.Write("Fail");
            //    Response.End();
            //}
        }
    }
    private void getData(int levelID)
    {
        DataSet ds_Person = new DataSet();
        ds_Person = objEmployee.select_Designationdetails(levelID);
        if (ds_Person.Tables[0].Rows.Count > 0)
        {
            Response.Clear();
            Response.ContentType = "text/xml";
            Response.Write(ds_Person.GetXml());
            Response.End();
            ds_Person.Dispose();
        }
    }
}
