using System;
using System.Globalization;
using System.Resources;
using System.Threading;
/****************************************************************************************************************************
* Project Name    : TimeCheck                                        Created On  : 12-Aug-2007
* Module          : Leave Policy                                     Modified On : 08-Aug-2007
* Created By      : Arun Vinoth.T
* Modified By     : 
* Current Storage : \\Angler56\Projects\Inprogress\SCREEN1206\code\Time_AttendanceApp
****************************************************************************************************************************/
public partial class Organization_Settings_OTRoundoff_Remote : Base.BasePage
{
    #region Global Variable Declaration
    int PolicyID;
    string Policy;
    int controlID;
    ResourceManager rm;
    CultureInfo ci;
    #endregion

    #region Page Load Event
    protected override void Page_Load(object sender, EventArgs e)
    {
        GC.Collect();
        base.Page_Load(sender, e);
        string source_Language;
        source_Language = Convert.ToString(Session["Session_ActiveLanguage"]);
        rm = new ResourceManager(source_Language, System.Reflection.Assembly.Load("App_GlobalResources"));
        ci = Thread.CurrentThread.CurrentCulture;
        if (Request.QueryString["controlID"] != null && Request.QueryString["controlID"] != "")
        {
            controlID = Convert.ToInt32(Request.QueryString["controlID"].ToString());
            GenerateControls();
        }
    }
    #endregion

    #region User Defined Functions
    private void GenerateControls()
    {
        Response.Clear();
        string str_tblpolicy = "";
        str_tblpolicy += "<div id='tbl_LeavePolicy" + controlID + "' width='100%'>";
        str_tblpolicy += "<div class='row pull-left-button'>";
        str_tblpolicy += "<div class='col-md-3'><input type='text' placeholder='Start Time(hh:mm)' style=\"margin-bottom:15px\"  name='txt_From" + controlID + "'  ID='txt_From" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></div>";
        str_tblpolicy += "<div class='col-md-3'><input type='text' placeholder='End Time(hh:mm)' style=\"margin-bottom:15px\" name='txt_To" + controlID + "'  ID='txt_To" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></div>";
        str_tblpolicy += "<div class='col-md-3'><input type='text' placeholder='Rounded As(hh:mm)' style=\"margin-bottom:15px\" name='txt_RoundedAs" + controlID + "'  ID='txt_RoundedAs" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></div>";
        str_tblpolicy += "<div class='col-md-3'><button type=\"button\" style=\"margin-left:0px\" id=\"Del_Button" + controlID + "\" class=\"btn save-btn\" runat=\"server\" OnClick=\"javascript:return removeRowOT(" + controlID + ",this,'" + rm.GetString("Alert_Deleteonebyonefromlastdata", ci) + "');\"><span class=\"fa fa-trash-o\"></span>  Delete</button> </div></div>";
        str_tblpolicy += "</div >";
        Response.Write(str_tblpolicy);
        Response.End();

        //Response.Clear();
        //string str_tblpolicy = "";
        //str_tblpolicy += "<table id='tbl_LeavePolicy' width='100%'>";
        //str_tblpolicy += "<thead>";
        //str_tblpolicy += "<tr align='left'>";
        //str_tblpolicy += "<th class='col-md-3'> Test1 </th>";
        //str_tblpolicy += "<th class='col-md-3'> Test2 </th>";
        //str_tblpolicy += "<th class='col-md-3'> Test3 </th>";
        //str_tblpolicy += "<th class='col-md-3'> Test4 </th>";
        //str_tblpolicy += "</tr>";
        //str_tblpolicy += "</thead>";
        //str_tblpolicy += "<tbody>";
        //str_tblpolicy += "<tr align='left'>";
        //str_tblpolicy += "<td class='col-md-3'><input type='text' name='txt_From" + controlID + "'  ID='txt_From" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></td>";
        //str_tblpolicy += "<td class='col-md-3'><input type='text' name='txt_To" + controlID + "'  ID='txt_To" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></td>";
        //str_tblpolicy += "<td class='col-md-3'><input type='text' name='txt_RoundedAs" + controlID + "'  ID='txt_RoundedAs" + controlID + "' Class='form-control' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5' onblur=\"javascript:return RoundoffValidation(this," + controlID + ",'" + rm.GetString("Alert_EnterStartTimeTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidStartTime", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbegreaterthanoneminuteofpreviousEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenStartTimeshouldbelesserthancurrentEndTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_EntervalidEndTimehhmm", ci) + "','" + rm.GetString("Alert_EnterEndTimewhichshouldbegreaterthanStartTimeandmaximumof", ci) + "','" + rm.GetString("Alert_EndTimeshouldbegreaterthanStartTime", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbelesserthanoneminuteofnextStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_GivenEndTimeshouldbegreaterthancurrentStartTimePleaseverify", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "','" + rm.GetString("Alert_EntervalidRoundedAs", ci) + "','" + rm.GetString("Alert_EnterRoundedAsTheRangeis", ci) + "');\"/></td>";
        //str_tblpolicy += "<td class='col-md-3'><input Class=\"btn btn-primary fa fa-trash-o\" id=\"Del_Button" + controlID + "\" type=\"button\" value=\"" + rm.GetString("btn_Delete", ci) + "\" runat=\"server\" OnClick=\"javascript:return removeRowOT(" + controlID + ",this,'" + rm.GetString("Alert_Deleteonebyonefromlastdata", ci) + "');\"/></td></tr>";
        //str_tblpolicy += "</tbody></table >";
        //Response.Write(str_tblpolicy);
        //Response.End();
    }
    #endregion
}
