using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Transactions_DiscrepancyRemote : Base.BasePage
{
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking and reset date format
        base.Page_Load(sender, e);    
        string strInDate = "";
        string strInTime="";
        string strOutDate="";
        string strOutTime="";
        if (Request.QueryString["inDate"] !=null)
        {
            strInDate = Convert.ToString(Request.QueryString["inDate"]);
        }
        if (Request.QueryString["inTime"] !=null)
        {
            strInTime = Convert.ToString(Request.QueryString["inTime"]);
        }
        if (Request.QueryString["outDate"] !=null)
        {
            strOutDate = Convert.ToString(Request.QueryString["outDate"]);
        }
        if (Request.QueryString["outTime"] !=null)
        {
            strOutTime = Convert.ToString(Request.QueryString["outTime"]);
        }
        string strStartDate = "";
        string strEndDate = "";
        string gstrDateFormat = Convert.ToString(Session["MDateFormat"]);
        cls_Common objClassCommon = new cls_Common();
        strStartDate = objClassCommon.DateConvertion(gstrDateFormat, strInDate);
        strEndDate = objClassCommon.DateConvertion(gstrDateFormat, strOutDate);
        strInDate = strStartDate;
        strOutDate = strEndDate;
        DateTime dtInTime = DateTime.Parse(strInDate + " " + strInTime);
        DateTime dtOutTime = DateTime.Parse(strOutDate + " " + strOutTime);
        if (DateTime.Compare(dtInTime, dtOutTime)>0)
        {
            //
            Response.Clear();
            Response.Write("InDate and Time is greater than OutDate and Time for " + Convert.ToString(dtInTime)  + " And " + Convert.ToString(dtOutTime)   );
            Response.End();
            return;
        }
        else
        {
            //
            Response.Clear();
            Response.Write("Success");
            Response.End();
            return;
        }
    }
}
