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.Globalization;
using System.Threading;
using System.Reflection;
using System.Resources; 
public partial class Transactions_ManualEntryEmployeePopup : Base.BasePage
{
    ResourceManager rm;
    ManualEntryEventData objManualEntryEventData = new ManualEntryEventData();
    int gintRouteId;
    string gstrInDate;
    protected override void Page_Load(object sender, EventArgs e)
    {
        // session checking
        base.Page_Load(sender, e);
        //get the culture info to set the language
        CultureInfo ci;
        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;
        aspnetForm.Attributes.CssStyle.Add("Direction", rm.GetString("Direction", ci));
        LoadStrings(ci);
        gintRouteId = int.Parse(Request.QueryString["RouteId"].ToString());
        gstrInDate = Request.QueryString["InDate"].ToString();
        FillEmployees();                       
    }
    private void FillEmployees()
    {
        DataSet dsEmployee = new DataSet();
        dsEmployee = objManualEntryEventData.SelectEmployeesBasedOnRoutes(gintRouteId, gstrInDate, Int32.Parse(Session["EmpAutoID"].ToString()),"Select");
        grv_Employee.DataSource = dsEmployee.Tables[0];
        grv_Employee.DataBind();
    }
    // Getting Information from resource file and display it in label
    private void LoadStrings(CultureInfo ci)
    {        
       btn_Ok.Text = rm.GetString("btn_Ok", ci);
       //grv_Employee.Columns[0].HeaderText = rm.GetString("", ci);
       grv_Employee.Columns[1].HeaderText = rm.GetString("email_EmployeeId", ci);
       grv_Employee.Columns[2].HeaderText = rm.GetString("email_EmployeeName", ci);
    }
}
