using System;
public partial class Masters_AjaxEmpSwipeCardValid : Base.BasePage
{
    EmployeeEventData objEmployee = new EmployeeEventData();
    string gstrAutoId, gstrSwipeCard, gstrType;
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking and reset date format
        base.Page_Load(sender, e);
        if (Request.QueryString["EmpSwipeCard"] != null && Request.QueryString["EmpSwipeCard"] != "")
        {
            gstrSwipeCard =  Convert.ToString(Request.QueryString["EmpSwipeCard"]);
        }
        if (Request.QueryString["inType"] != null && Request.QueryString["inType"] != "")
        {
            gstrType =  Convert.ToString(Request.QueryString["inType"]);
        }
        if (Request.QueryString["AutoID"] != null && Request.QueryString["AutoID"] != "")
        {
            gstrAutoId =  Convert.ToString(Request.QueryString["AutoID"]);
        }
        int count = 0;
        if (gstrType == "Add")
        {
            count = objEmployee.CheckDuplicateEmployeeSwipeCardAddupdate(gstrSwipeCard, gstrAutoId, gstrType);
        }
        else if (gstrType == "Modify")
        {
            count = objEmployee.CheckDuplicateEmployeeSwipeCardAddupdate(gstrSwipeCard, gstrAutoId, gstrType);
        }
        if (count == 0)
        {
            Response.Clear();
            Response.Write("Success");
            Response.End();
        }
        else
        {
            Response.Clear();
            Response.Write("Fail");
            Response.End();
        }
    }
}
