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;
using System.Resources;
using System.Globalization;
using System.Threading;
public partial class Masters_ConfigurationControlsCreation : Base.BasePage
{
    int PolicyID;
    string Policy;
    int controlID;
    ResourceManager rm;
    CultureInfo ci;
    protected override void Page_Load(object sender, EventArgs e)
    {
        GC.Collect();
        // session checking
        base.Page_Load(sender, e);
        //get the culture info to set the language
        string source_Language;
        source_Language = Session["Session_ActiveLanguage"].ToString();
        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();
        }
    }
    private void GenerateControls()
    {
        Response.Clear();
        string str_tblpolicy = "";
        str_tblpolicy += "<table id='tbl_LeavePolicy' width='100%'>";
        str_tblpolicy += "<tr class='pull-left-button'>";
        str_tblpolicy += "<td class='td pull-left-button'><input type='text' name='txt_From" + controlID + "'  ID='txt_From" + controlID + "' Class='textbox_short' 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='td pull-left-button'><input type='text' name='txt_To" + controlID + "'  ID='txt_To" + controlID + "' Class='textbox_short' 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='td pull-left-button'><input type='text' name='txt_RoundedAs" + controlID + "'  ID='txt_RoundedAs" + controlID + "' Class='textbox_short' onpaste='return false' ondrop='return false' oncut='return false' EnableViewState='true' runat='server' MaxLength='5');\"/></td>";
        str_tblpolicy += "<td class='td pull-left-button'><input Class=\"but\" 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 += "</table >";
        Response.Write(str_tblpolicy);
        Response.End();
    }
}
