Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            cboDisplayGroups.Focus();

            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Site/Config.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winAddDisplayGroup_group")).FirstOrDefault();
            winAddDisplayGroup_group.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winAddDisplayGroup_description")).FirstOrDefault();
            winAddDisplayGroup_description.Text = (var2 == null) ? "" : var2.Contents;

            var var28 = list.Where(x => x.ControlId.Contains("winAddDisplayGroup_btnEdit")).FirstOrDefault();
            btnAdd.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winAddDisplayGroup_delete")).FirstOrDefault();
            btnDelete.Text = (var29 == null) ? "" : var29.Contents;
        }


        msg.Text = string.Empty;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string logger = Request.QueryString["logger"];
            txtSerial.Text = logger;
            BindFile();
        }
        lblMessage.Visible = false;

        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Device/All.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winLinkUpload_MeterSeri")).FirstOrDefault();
            winLinkUpload_MeterSeri.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winLinkUpload_FileSelection")).FirstOrDefault();
            winLinkUpload_FileSelection.Text = (var2 == null) ? "" : var2.Contents;


            var var28 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnUpload")).FirstOrDefault();
            btnDownload.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnDownload")).FirstOrDefault();
            btnUpload.Text = (var29 == null) ? "" : var29.Contents;
            var var30 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnDelete")).FirstOrDefault();
            btnDelete.Text = (var30 == null) ? "" : var30.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            cboStaffs.Focus();
        }
        msg.Text = string.Empty;


        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Admin/CreateUser.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winAddStaff_staffId")).FirstOrDefault();
            winAddStaff_staffId.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winAddStaff_staffName")).FirstOrDefault();
            winAddStaff_staffName.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("winAddStaff_staffLastName")).FirstOrDefault();
            winAddStaff_staffLastName.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("winAddStaff_staffAddress")).FirstOrDefault();
            winAddStaff_staffAddress.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("winAddStaff_staffMobile")).FirstOrDefault();
            winAddStaff_staffMobile.Text = (var5 == null) ? "" : var5.Contents;


            var var28 = list.Where(x => x.ControlId.Contains("winAddStaff_btnEdit")).FirstOrDefault();
            btnAdd.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winAddStaff_btnDelete")).FirstOrDefault();
            btnDelete.Text = (var29 == null) ? "" : var29.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Report/Montly.aspx")).ToList();

            var var01 = list.Where(x => x.ControlId.Contains("lbMonthlyFrom")).FirstOrDefault();
            lbMonthlyFrom.Text = (var01 == null) ? "" : var01.Contents;
            var var02 = list.Where(x => x.ControlId.Contains("lbMonthlyTo")).FirstOrDefault();
            lbMonthlyTo.Text = (var02 == null) ? "" : var02.Contents;
            var var03 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var03 == null) ? "" : var03.Contents;
            var var04 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var04 == null) ? "" : var04.Contents;
            var var05 = list.Where(x => x.ControlId.Contains("btnMail")).FirstOrDefault();
            btnMail.Text = (var05 == null) ? "" : var05.Contents;
            var var06 = list.Where(x => x.ControlId.Contains("lbAliasName")).FirstOrDefault();
            lbAliasName.Text = (var06 == null) ? "" : var06.Contents;
            var var07 = list.Where(x => x.ControlId.Contains("lbStaffId")).FirstOrDefault();
            lbStaffId.Text = (var07 == null) ? "" : var07.Contents;


            // Change header of rad grid
            var var5 = list.Where(x => x.ControlId.Contains("grv_Time")).FirstOrDefault();
            grv.MasterTableView.GetColumn("Time").HeaderText = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grv_SiteAliasName")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column13").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grv_TemplateColumn")).FirstOrDefault();
            grv.MasterTableView.GetColumn("TemplateColumn").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grv_TemplateColumn1")).FirstOrDefault();
            grv.MasterTableView.GetColumn("TemplateColumn1").HeaderText = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("grv_Output")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column").HeaderText = (var9 == null) ? "" : var9.Contents;


            // Change header of combobox
            Label label1 = cboSites.Header.FindControl("aliasname_header") as Label;
            var   var39  = list.Where(x => x.ControlId.Contains("radComboBox_aliasname_header")).FirstOrDefault();
            label1.Text = (var39 == null) ? "" : var39.Contents;

            label1 = cboSites.Header.FindControl("location_header") as Label;
            var var40 = list.Where(x => x.ControlId.Contains("radComboBox_location_header")).FirstOrDefault();
            label1.Text = (var40 == null) ? "" : var40.Contents;

            // Change header of combobox
            Label label2 = cboConsumers.Header.FindControl("customerId_header") as Label;
            var   var41  = list.Where(x => x.ControlId.Contains("radComboBox_customerId_header")).FirstOrDefault();
            label2.Text = (var41 == null) ? "" : var41.Contents;

            label2 = cboConsumers.Header.FindControl("customer_header") as Label;
            var var42 = list.Where(x => x.ControlId.Contains("radComboBox_customer_header")).FirstOrDefault();
            label2.Text = (var42 == null) ? "" : var42.Contents;
        }
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;
        if (!IsPostBack)
        {
            var user = _userBL.GetUser(HttpContext.Current.User.Identity.Name);
            IEnumerable <t_Sites> sites;
            if (user.Role == "consumer")
            {
                sites = _siteBL.GetSitesByConsumerID(user.ConsumerId);
            }
            else if (user.Role == "staff")
            {
                sites = _siteBL.GetSitesByStaffId(user.StaffId);
            }
            else
            {
                sites = null;
            }
            cboSites.DataSource = sites;
            var current = sites.FirstOrDefault();
            if (current != null)
            {
                txtLocation.Text = current.Location;
            }
            cboSites.DataBind();
        }


        // Pi-solution developer - multi languages
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Daily_Monthly.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var4 == null) ? "" : var4.Contents;


            // News comparing to supervisor
            List <t_LanguageTranslate> list2 = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Site/Config.aspx")).ToList();
            var var11 = list2.Where(x => x.ControlId.Contains("lbTagName")).FirstOrDefault();
            lbTagName.Text = (var11 == null) ? "" : var11.Contents;
            var var22 = list2.Where(x => x.ControlId.Contains("lbLocation")).FirstOrDefault();
            lbLocation.Text = (var22 == null) ? "" : var22.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        // Pi-solution developer - multi languages
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Daily_Monthly.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var4 == null) ? "" : var4.Contents;


            // Change header of rad grid
            var var5 = list.Where(x => x.ControlId.Contains("grv_TimeStamp")).FirstOrDefault();
            grv.MasterTableView.GetColumn("Time").HeaderText = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grv_SiteAliasName")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column13").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grv_MaxFlowRate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column14").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grv_MinFlowRate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column17").HeaderText = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("grv_Output")).FirstOrDefault();
            grv.MasterTableView.GetColumn("Output").HeaderText = (var9 == null) ? "" : var9.Contents;

            var var10 = list.Where(x => x.ControlId.Contains("grv_MaxPressure")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column15").HeaderText = (var10 == null) ? "" : var10.Contents;

            var             var13        = list.Where(x => x.ControlId.Contains("grv_Output_footer")).FirstOrDefault();
            GridBoundColumn outputColumn = grv.MasterTableView.GetColumn("Output") as GridBoundColumn;
            outputColumn.FooterAggregateFormatString = (var13 == null) ? "" : var13.Contents;

            var var11 = list.Where(x => x.ControlId.Contains("grv_MinPressure")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column16").HeaderText = (var11 == null) ? "" : var11.Contents;
            var var12 = list.Where(x => x.ControlId.Contains("grv_Trending")).FirstOrDefault();
            grv.MasterTableView.GetColumn("lnkColumn").HeaderText = (var12 == null) ? "" : var12.Contents;


            // Popup
            var var14 = list.Where(x => x.ControlId.Contains("grv_Trending_winTable")).FirstOrDefault();
            winTable.Title = (var14 == null) ? "" : var14.Contents;
            var var15 = list.Where(x => x.ControlId.Contains("grv_Trending_winChart")).FirstOrDefault();
            winChart.Title = (var15 == null) ? "" : var15.Contents;
        }
    }
Esempio n. 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution developer - multi languages
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> listLanguage = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/DetailTable.aspx")).ToList();

            //Parse content to form
            var var1 = listLanguage.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = listLanguage.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var2 == null) ? "" : var2.Contents;

            var var3 = listLanguage.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = listLanguage.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var4 == null) ? "" : var4.Contents;

            // Title
            var var5 = listLanguage.Where(x => x.ControlId.Contains("lbTitleContent")).FirstOrDefault();
            tileContent = (var5 == null) ? "" : var5.Contents;

            // Change header of rad grid
            var var15 = listLanguage.Where(x => x.ControlId.Contains("grv_TimeStamp")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column3").HeaderText = (var15 == null) ? "" : var15.Contents;
            var var16 = listLanguage.Where(x => x.ControlId.Contains("grv_FlowRate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column").HeaderText = (var16 == null) ? "" : var16.Contents;
            var var17 = listLanguage.Where(x => x.ControlId.Contains("grv_ForwardIndex")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column2").HeaderText = (var17 == null) ? "" : var17.Contents;
            var var18 = listLanguage.Where(x => x.ControlId.Contains("grv_ReverseIndex")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column4").HeaderText = (var18 == null) ? "" : var18.Contents;
            var var19 = listLanguage.Where(x => x.ControlId.Contains("grv_NetIndex")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column5").HeaderText = (var19 == null) ? "" : var19.Contents;
            var var20 = listLanguage.Where(x => x.ControlId.Contains("grv_Pressure")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column1").HeaderText = (var20 == null) ? "" : var20.Contents;
        }

        CultureInfo culture = new CultureInfo("en-GB");
        string      siteID  = Request.QueryString["si"];
        double      oADate  = double.Parse(Request.QueryString["dt"]);
        DateTime    date    = DateTime.FromOADate(oADate);
        t_Sites     site    = _siteBL.GetSite(siteID);
        var         list    = _loggerDataHelper.GetComplexLoggerData(site.SiteId, date, date);

        lblTitle.Text  = tileContent + " " + site.SiteAliasName + " (" + site.Location + ") " + date.ToString("dd-MM-yyyy");
        grv.DataSource = list;
        grv.DataBind();
        grv.ExportSettings.FileName = site.SiteAliasName + "_" + date.ToString("yyyy_MM_dd");
        ntf.VisibleOnPageLoad       = false;
    }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/Users/Add.aspx")).ToList();

        if (!IsPostBack)
        {
            // Language - Pi-solution

            var var1 = list.Where(x => x.ControlId.Contains("lbUserName")).FirstOrDefault();
            lbUserName.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("lbPassword")).FirstOrDefault();
            lbPassword.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("lbStaffId")).FirstOrDefault();
            lbStaffId.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("lbConsumerId")).FirstOrDefault();
            lbConsumerId.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("lbEmail")).FirstOrDefault();
            lbEmail.Text = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("lbRole")).FirstOrDefault();
            lbRole.Text = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("lbActive")).FirstOrDefault();
            lbActive.Text = (var7 == null) ? "" : var7.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/RoleFunction.aspx")).ToList();


        if (!IsPostBack)
        {
            DataTable dt = new DataTable();

            ddlRole.DataSource     = ToDataTable(roleBL.FindAll().ToList());
            ddlRole.DataTextField  = "Description";
            ddlRole.DataValueField = "Role";
            ddlRole.DataBind();
            ddlRole.SelectedValue = "admin";

            LoadData("admin");

            // Language
            var var1 = list.Where(x => x.ControlId.Contains("btnEdit")).FirstOrDefault();
            btnEdit.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnUpdate")).FirstOrDefault();
            btnUpdate.Text = (var2 == null) ? "" : var2.Contents;

            var var3 = list.Where(x => x.ControlId.Contains("lbSelectRole")).FirstOrDefault();
            lbRole.Text = (var3 == null) ? "" : var3.Contents;
        }
    }
Esempio n. 10
0
    protected void btnView_Click(object sender, EventArgs e)
    {
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Warning")).ToList();

        var empty_start_date = list.Where(x => x.ControlId.Contains("empty_start_date")).FirstOrDefault();
        var empty_end_date   = list.Where(x => x.ControlId.Contains("empty_end_date")).FirstOrDefault();

        if (myStart1.SelectedDate == null)
        {
            ntf.VisibleOnPageLoad = true;
            ntf.Text = empty_start_date.Contents;
            myStart1.Focus();
            return;
        }
        if (myEnd1.SelectedDate == null)
        {
            ntf.VisibleOnPageLoad = true;
            ntf.Text = empty_end_date.Contents;
            myEnd1.Focus();
            return;
        }
        DateTime startDate = (DateTime)myStart1.SelectedDate;
        DateTime endDate   = (DateTime)myEnd1.SelectedDate;

        var site = _siteBL.GetSite(cboSites1.SelectedValue);
        List <ProductionReport> listReportDataViewModel = _prodBL.GetHourlyProductionReport(site.SiteId, startDate, endDate);

        grv1.DataSource = listReportDataViewModel;
        grv1.DataBind();
        grv1.ExportSettings.FileName = site.SiteAliasName + "_" + startDate.ToString("dd-MM-yyyy HH:mm") + "--" + endDate.ToString("dd-MM-yyyy HH:mm");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.ControlId.Contains("ChangePassword")).ToList();

        string OldPassword        = "";
        string NewPassword        = "";
        string ConfirmNewPassword = "";
        string buttonSave         = "";

        //Parse content to form
        var var1 = list.Where(x => x.ControlId.Contains("txtOldPassword")).FirstOrDefault();

        OldPassword = (var1 == null) ? "" : var1.Contents;
        var var2 = list.Where(x => x.ControlId.Contains("txtNewPassword")).FirstOrDefault();

        NewPassword = (var2 == null) ? "" : var2.Contents;
        var var3 = list.Where(x => x.ControlId.Contains("txtConfirmNewPassword")).FirstOrDefault();

        ConfirmNewPassword = (var3 == null) ? "" : var3.Contents;
        var var4 = list.Where(x => x.ControlId.Contains("btnOK")).FirstOrDefault();

        buttonSave = (var4 == null) ? "" : var4.Contents;

        lbOldPassword.Text        = OldPassword;
        lbNewPassword.Text        = NewPassword;
        lbConfirmNewPassword.Text = ConfirmNewPassword;
        btnOK.Text = buttonSave;
    }
Esempio n. 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Device/All.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winLinkUpload_MeterSeri")).FirstOrDefault();
            winLinkUpload_MeterSeri.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winLinkUpload_FileSelection")).FirstOrDefault();
            winLinkUpload_FileSelection.Text = (var2 == null) ? "" : var2.Contents;


            var var28 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnUpload")).FirstOrDefault();
            btnDownload.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnDownload")).FirstOrDefault();
            btnUpload.Text = (var29 == null) ? "" : var29.Contents;
            var var30 = list.Where(x => x.ControlId.Contains("winLinkUpload_btnDelete")).FirstOrDefault();
            btnDelete.Text = (var30 == null) ? "" : var30.Contents;


            // Change header of rad grid
            var var5 = list.Where(x => x.ControlId.Contains("grv_FileName")).FirstOrDefault();
            grv.MasterTableView.GetColumn("FileName").HeaderText = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grv_Seri_number")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column1").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grv_mime_type")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column2").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grv_size")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column3").HeaderText = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("grv_UploadDate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column4").HeaderText = (var9 == null) ? "" : var9.Contents;
        }



        if (!IsPostBack)
        {
            string meter = Request.QueryString["meter"];
            txtSerial.Text = meter;
            BindFile();
        }
        lblMessage.Visible = false;
    }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Summary/Device.aspx")).ToList();

            var var01 = list.Where(x => x.ControlId.Contains("lbManufacturer")).FirstOrDefault();
            lbManufacturer.Text = (var01 == null) ? "" : var01.Contents;
            var var02 = list.Where(x => x.ControlId.Contains("lbBrandName")).FirstOrDefault();
            lbBrandName.Text = (var02 == null) ? "" : var02.Contents;
            var var04 = list.Where(x => x.ControlId.Contains("lbModel")).FirstOrDefault();
            lbModel.Text = (var04 == null) ? "" : var04.Contents;
            var var14 = list.Where(x => x.ControlId.Contains("lbStatus")).FirstOrDefault();
            lbStatus.Text = (var14 == null) ? "" : var14.Contents;
            var var15 = list.Where(x => x.ControlId.Contains("lbSetup")).FirstOrDefault();
            lbSetup.Text = (var15 == null) ? "" : var15.Contents;

            // Change header of rad grid
            var var5 = list.Where(x => x.ControlId.Contains("grv_STT")).FirstOrDefault();
            grv.MasterTableView.GetColumn("STT").HeaderText = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grv_Serial")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column1").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grv_Provider")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column2").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grv_Marks")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column3").HeaderText = (var8 == null) ? "" : var8.Contents;


            var var10 = list.Where(x => x.ControlId.Contains("grv_Installed")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column5").HeaderText = (var10 == null) ? "" : var10.Contents;

            var var11 = list.Where(x => x.ControlId.Contains("grv_SiteAliasName")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column13").HeaderText = (var11 == null) ? "" : var11.Contents;
            var var12 = list.Where(x => x.ControlId.Contains("grv_Location")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column7").HeaderText = (var12 == null) ? "" : var12.Contents;

            var var22 = list.Where(x => x.ControlId.Contains("grv_ReceiptDate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column8").HeaderText = (var22 == null) ? "" : var22.Contents;
            var var32 = list.Where(x => x.ControlId.Contains("grv_Model")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column10").HeaderText = (var32 == null) ? "" : var32.Contents;
            var var42 = list.Where(x => x.ControlId.Contains("grv_Status")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column11").HeaderText = (var42 == null) ? "" : var42.Contents;
            var var52 = list.Where(x => x.ControlId.Contains("grv_Description")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column12").HeaderText = (var52 == null) ? "" : var52.Contents;

            var var003 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var003 == null) ? "" : var003.Contents;
            var var004 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var004 == null) ? "" : var004.Contents;
        }

        if (!IsPostBack)
        {
            BindData();
        }
    }
Esempio n. 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Pi-solution developer - multi languages
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Complex_TA.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("lbTitle")).FirstOrDefault();
            lbTitle.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnSearch")).FirstOrDefault();
            btnSearch.Text = (var2 == null) ? "" : var2.Contents;

            // Pi-solution
            // Binding data source
            this.BindItemsList();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        txtLoggerID.Text = Request.QueryString["loggerID"];
        txtSiteID.Text   = Request.QueryString["siteID"];
        msg.Text         = string.Empty;


        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Site/Config.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winAddChannel_channelId")).FirstOrDefault();
            winAddChannel_channelId.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winAddChannel_locationId")).FirstOrDefault();
            winAddChannel_locationId.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("winAddChannel_loggerId")).FirstOrDefault();
            winAddChannel_loggerId.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("winAddChannel_channelFront")).FirstOrDefault();
            winAddChannel_channelFront.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("winAddChannel_channelBack")).FirstOrDefault();
            winAddChannel_channelBack.Text = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("winAddChannel_channelForward")).FirstOrDefault();
            winAddChannel_channelForward.Text = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("winAddChannel_channelBackward")).FirstOrDefault();
            winAddChannel_channelBackward.Text = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("winAddChannel_Note")).FirstOrDefault();
            winAddChannel_Note.Text = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("winAddChannel_channelName")).FirstOrDefault();
            winAddChannel_channelName.Text = (var9 == null) ? "" : var9.Contents;
            var var10 = list.Where(x => x.ControlId.Contains("winAddChannel_channelUnit")).FirstOrDefault();
            winAddChannel_channelUnit.Text = (var10 == null) ? "" : var10.Contents;


            var var28 = list.Where(x => x.ControlId.Contains("winAddChannel_btnEdit")).FirstOrDefault();
            btnAdd.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winAddChannel_delete")).FirstOrDefault();
            btnDelete.Text = (var29 == null) ? "" : var29.Contents;
        }
    }
Esempio n. 16
0
    public string LoggerId_check()
    {
        // Pi-solution
        language = (HttpContext.Current.Session["myapplication.language"] == null) ? "vi" : HttpContext.Current.Session["myapplication.language"].ToString();

        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Site/Config.aspx")).ToList();

        var var1 = list.Where(x => x.ControlId.Contains("logger_Id_check")).FirstOrDefault();

        return(var1.Contents);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Daily_Monthly.aspx")).ToList();

            var var01 = list.Where(x => x.ControlId.Contains("lbMonthlyFrom")).FirstOrDefault();
            lbMonthlyFrom.Text = (var01 == null) ? "" : var01.Contents;
            var var02 = list.Where(x => x.ControlId.Contains("lbMonthlyTo")).FirstOrDefault();
            lbMonthlyTo.Text = (var02 == null) ? "" : var02.Contents;
            var var03 = list.Where(x => x.ControlId.Contains("btnView_tab2")).FirstOrDefault();
            btnView.Text = (var03 == null) ? "" : var03.Contents;
            var var04 = list.Where(x => x.ControlId.Contains("btnExport_tab2")).FirstOrDefault();
            btnExport.Text = (var04 == null) ? "" : var04.Contents;


            // Change header of rad grid
            var var5 = list.Where(x => x.ControlId.Contains("grv_TimeStamp")).FirstOrDefault();
            grv.MasterTableView.GetColumn("Time").HeaderText = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grv_SiteAliasName")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column13").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grv_MaxFlowRate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column14").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grv_MinFlowRate")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column15").HeaderText = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("grv_Output")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column2").HeaderText = (var9 == null) ? "" : var9.Contents;

            var var10 = list.Where(x => x.ControlId.Contains("grv_MaxPressure")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column16").HeaderText = (var10 == null) ? "" : var10.Contents;

            var var11 = list.Where(x => x.ControlId.Contains("grv_MinPressure")).FirstOrDefault();
            grv.MasterTableView.GetColumn("column17").HeaderText = (var11 == null) ? "" : var11.Contents;
            var var12 = list.Where(x => x.ControlId.Contains("grv_Trending")).FirstOrDefault();
            grv.MasterTableView.GetColumn("lnkColumns").HeaderText = (var12 == null) ? "" : var12.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/Users.aspx")).ToList();


        // Load language contents - vietnamse
        List <t_Users>     contentList = userBL.FindAll().OrderBy(s => s.Role).ToList();
        List <t_Users_DTO> listDTO     = new List <t_Users_DTO>();
        int index = 0;


        foreach (var item in contentList)
        {
            if (item.Active == null)
            {
                item.Active = false;
            }

            listDTO.Add(new t_Users_DTO
            {
                Id_display = (index + 1).ToString("0000"),
                Password   = item.Password,
                Salt       = item.Salt,
                Email      = item.Email,
                ConsumerId = item.ConsumerId,
                Role       = item.Role,
                StaffId    = item.StaffId,
                Username   = item.Username,
                Active     = (bool)item.Active ? "True" : "False"
            });
            index++;
        }


        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            GridView1.DataSource = ToDataTable(listDTO);
            GridView1.DataBind();

            // Language
            var var1 = list.Where(x => x.ControlId.Contains("btnEdit")).FirstOrDefault();
            btnEdit.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnUpdate")).FirstOrDefault();
            btnUpdate.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("btnAdd")).FirstOrDefault();
            btnAdd.Text = (var3 == null) ? "" : var3.Contents;
        }
    }
Esempio n. 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lblMessage.Visible = false;
        if (!IsPostBack)
        {
            string accreditation = Request.QueryString["acc"];
            cboAccreditationDocuments.Text = accreditation;
            BindData();
        }

        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Device/All.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_verificationDocument")).FirstOrDefault();
            winAccreditationMeter_verificationDocument.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_MeterSeri")).FirstOrDefault();
            winAccreditationMeter_MeterSeri.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_DisplaySeri")).FirstOrDefault();
            winAccreditationMeter_DisplaySeri.Text = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_verificationType")).FirstOrDefault();
            winAccreditationMeter_verificationType.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_date")).FirstOrDefault();
            winAccreditationMeter_date.Text = (var5 == null) ? "" : var5.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_dueDate")).FirstOrDefault();
            winAccreditationMeter_dueDate.Text = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_note")).FirstOrDefault();
            winAccreditationMeter_note.Text = (var7 == null) ? "" : var7.Contents;


            var var28 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_btnEdit")).FirstOrDefault();
            btnAdd.Text = (var28 == null) ? "" : var28.Contents;
            var var29 = list.Where(x => x.ControlId.Contains("winAccreditationMeter_delete")).FirstOrDefault();
            btnDelete.Text = (var29 == null) ? "" : var29.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Language/ChangeContent.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("lbTitle")).FirstOrDefault();
            lbTitle.Text = (var1 == null) ? "" : var1.Contents;
        }
    }
Esempio n. 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/MinMaxVal.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("lbTitle")).FirstOrDefault();
            lbTitle.Text = (var1 == null) ? "" : var1.Contents;

            var var2 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var3 == null) ? "" : var3.Contents;

            var var4 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var5 == null) ? "" : var5.Contents;


            // Change header of rad grid
            var var15 = list.Where(x => x.ControlId.Contains("grid_Type")).FirstOrDefault();
            grid.MasterTableView.GetColumn("Type").HeaderText = (var15 == null) ? "" : var15.Contents;
            var var6 = list.Where(x => x.ControlId.Contains("grid_TypeVal")).FirstOrDefault();
            grid.MasterTableView.GetColumn("TypeVal").HeaderText = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("grid_SiteId")).FirstOrDefault();
            grid.MasterTableView.GetColumn("SiteId").HeaderText = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("grid_SiteAliasName")).FirstOrDefault();
            grid.MasterTableView.GetColumn("SiteAliasName").HeaderText = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("grid_Loc")).FirstOrDefault();
            grid.MasterTableView.GetColumn("Loc").HeaderText = (var9 == null) ? "" : var9.Contents;

            var var10 = list.Where(x => x.ControlId.Contains("grid_LoggerId")).FirstOrDefault();
            grid.MasterTableView.GetColumn("LoggerId").HeaderText = (var10 == null) ? "" : var10.Contents;

            var var11 = list.Where(x => x.ControlId.Contains("grid_ChnId")).FirstOrDefault();
            grid.MasterTableView.GetColumn("ChnId").HeaderText = (var11 == null) ? "" : var11.Contents;
            var var12 = list.Where(x => x.ControlId.Contains("grid_ChnName")).FirstOrDefault();
            grid.MasterTableView.GetColumn("ChnName").HeaderText = (var12 == null) ? "" : var12.Contents;

            var var13 = list.Where(x => x.ControlId.Contains("grid_Tmstmp")).FirstOrDefault();
            grid.MasterTableView.GetColumn("Tmstmp").HeaderText = (var13 == null) ? "" : var13.Contents;
            var var14 = list.Where(x => x.ControlId.Contains("grid_Val")).FirstOrDefault();
            grid.MasterTableView.GetColumn("Val").HeaderText = (var14 == null) ? "" : var14.Contents;
            var var16 = list.Where(x => x.ControlId.Contains("grid_Unit")).FirstOrDefault();
            grid.MasterTableView.GetColumn("Unit").HeaderText = (var16 == null) ? "" : var16.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/General.aspx")).ToList();


        // Load language contents - vietnamse
        List <t_SysParam>     contentList = sysParamBL.FindAll().OrderBy(s => s.ID).ToList();
        List <t_SysParam_DTO> listDTO     = new List <t_SysParam_DTO>();
        int index = 0;

        foreach (var item in contentList)
        {
            string NavigateURL   = "";
            string HyperLinkText = "";
            if (index == 0)
            {
                NavigateURL   = "/Supervisor/System/General/Edit.aspx?Id=2";
                HyperLinkText = "Edit";
            }
            listDTO.Add(new t_SysParam_DTO
            {
                Id            = item.ID,
                NavigateURL   = NavigateURL,
                HyperLinkText = HyperLinkText,
                Id_display    = (index + 1).ToString("0000"),
                Val           = item.Val,
                Description   = item.Description,
            });
            index++;
        }


        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            GridView1.DataSource = ToDataTable(listDTO);
            GridView1.DataBind();

            // Language
            var var1 = list.Where(x => x.ControlId.Contains("btnEdit")).FirstOrDefault();
            btnEdit.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnUpdate")).FirstOrDefault();
            btnUpdate.Text = (var2 == null) ? "" : var2.Contents;
        }
    }
Esempio n. 23
0
    private static string language = "vi"; protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;
        if (!IsPostBack)
        {
            SetEmptyRow();

            // Pi-solution Developer
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/ManualData/Add_Change.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var2 == null) ? "" : var2.Contents;

            var var3 = list.Where(x => x.ControlId.Contains("Column1")).FirstOrDefault();
            var var4 = list.Where(x => x.ControlId.Contains("Column2")).FirstOrDefault();
            var var5 = list.Where(x => x.ControlId.Contains("Column3")).FirstOrDefault();

            foreach (GridColumn col in grv.MasterTableView.Columns)
            {
                if (col.UniqueName == "Description")
                {
                    col.HeaderText = (var3 == null) ? "" : var3.Contents;
                }
                if (col.UniqueName == "TimeStamp")
                {
                    col.HeaderText = (var4 == null) ? "" : var4.Contents;
                }
                if (col.UniqueName == "Index")
                {
                    col.HeaderText = (var5 == null) ? "" : var5.Contents;
                }
            }
            grv.Rebind();

            var var6 = list.Where(x => x.ControlId.Contains("lbAliasName")).FirstOrDefault();
            lbAliasName.Text = (var6 == null) ? "" : var6.Contents;

            var var7 = list.Where(x => x.ControlId.Contains("btnView")).FirstOrDefault();
            btnView.Text = (var7 == null) ? "" : var7.Contents;
            var var8 = list.Where(x => x.ControlId.Contains("btnAdd")).FirstOrDefault();
            btnAdd.Text = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("btnDelete")).FirstOrDefault();
            btnDelete.Text = (var9 == null) ? "" : var9.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/Roles/Add.aspx")).ToList();

        if (!IsPostBack)
        {
            // Language - Pi-solution

            var var1 = list.Where(x => x.ControlId.Contains("btnSaveChanges")).FirstOrDefault();
            btnSaveChanges.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnCancelSave")).FirstOrDefault();
            btnCancelSave.Text = (var2 == null) ? "" : var2.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RadPivotGrid1.Visible = true;
            RadPivotGrid2.Visible = false;


            // Pi-solution
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Report/Press.aspx")).ToList();

            var var1 = list.Where(x => x.ControlId.Contains("lbTitle")).FirstOrDefault();
            lbTitle.Text = (var1 == null) ? "" : var1.Contents;

            var var2 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var3 == null) ? "" : var3.Contents;

            var var4 = list.Where(x => x.ControlId.Contains("btnRefresh")).FirstOrDefault();
            btnRefresh.Text = (var4 == null) ? "" : var4.Contents;
            var var5 = list.Where(x => x.ControlId.Contains("btnExport")).FirstOrDefault();
            btnExport.Text = (var5 == null) ? "" : var5.Contents;

            var var6 = list.Where(x => x.ControlId.Contains("chkHor")).FirstOrDefault();
            chkHor.Text = (var6 == null) ? "" : var6.Contents;
            var var7 = list.Where(x => x.ControlId.Contains("chkVer")).FirstOrDefault();
            chkVer.Text = (var7 == null) ? "" : var7.Contents;


            // Pi-solution - Set language for RadPivotGrid - Telerik
            var var8 = list.Where(x => x.ControlId.Contains("RadPivotGrid_SiteId")).FirstOrDefault();
            RadPivotGrid1.Fields[0].Caption = (var8 == null) ? "" : var8.Contents;
            RadPivotGrid2.Fields[0].Caption = (var8 == null) ? "" : var8.Contents;
            var var9 = list.Where(x => x.ControlId.Contains("RadPivotGrid_Type")).FirstOrDefault();
            RadPivotGrid1.Fields[1].Caption = (var9 == null) ? "" : var9.Contents;
            RadPivotGrid2.Fields[1].Caption = (var9 == null) ? "" : var9.Contents;
            var var10 = list.Where(x => x.ControlId.Contains("RadPivotGrid_TimeStamp")).FirstOrDefault();
            RadPivotGrid1.Fields[2].Caption = (var10 == null) ? "" : var10.Contents;
            RadPivotGrid2.Fields[2].Caption = (var10 == null) ? "" : var10.Contents;
            var var11 = list.Where(x => x.ControlId.Contains("RadPivotGrid_Value")).FirstOrDefault();
            RadPivotGrid1.Fields[3].Caption = (var11 == null) ? "" : var11.Contents;
            RadPivotGrid2.Fields[3].Caption = (var11 == null) ? "" : var11.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var sites = _siteBL.GetSites();
            cboSites.DataSource = sites;
            cboSites.DataBind();
            SetLatestData();

            // Pi-solution developer
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/ManualData/Add_Change.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("ucManualDataAdd_btnAdd")).FirstOrDefault();
            btnAdd.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("ucManualDataAdd_btnClear")).FirstOrDefault();
            btnClear.Text = (var2 == null) ? "" : var2.Contents;

            var var3 = list.Where(x => x.ControlId.Contains("Column1")).FirstOrDefault();
            var var4 = list.Where(x => x.ControlId.Contains("Column2")).FirstOrDefault();
            var var5 = list.Where(x => x.ControlId.Contains("Column3")).FirstOrDefault();

            foreach (GridColumn col in grv.MasterTableView.Columns)
            {
                if (col.UniqueName == "Description")
                {
                    col.HeaderText = (var3 == null) ? "" : var3.Contents;
                }
                if (col.UniqueName == "TimeStamp")
                {
                    col.HeaderText = (var4 == null) ? "" : var4.Contents;
                }
                if (col.UniqueName == "Index")
                {
                    col.HeaderText = (var5 == null) ? "" : var5.Contents;
                }
            }
            grv.Rebind();

            var var6 = list.Where(x => x.ControlId.Contains("lbAliasName")).FirstOrDefault();
            lbAliasName.Text = (var6 == null) ? "" : var6.Contents;
        }
        ntf.VisibleOnPageLoad = false;
    }
Esempio n. 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Daily_Monthly.aspx")).ToList();

            // Language - Pi-solution
            var var1 = list.Where(x => x.ControlId.Contains("Tab1")).FirstOrDefault();
            RadTabStrip1.Tabs[0].Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("Tab2")).FirstOrDefault();
            RadTabStrip1.Tabs[1].Text = (var2 == null) ? "" : var2.Contents;

            var var01 = list.Where(x => x.ControlId.Contains("lbTitle")).FirstOrDefault();
            lbTitle.Text = (var01 == null) ? "" : var01.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/Daily_Monthly.aspx")).ToList();

            var var01 = list.Where(x => x.ControlId.Contains("lbMonthlyFrom")).FirstOrDefault();
            lbMonthlyFrom.Text = (var01 == null) ? "" : var01.Contents;
            var var02 = list.Where(x => x.ControlId.Contains("lbMonthlyTo")).FirstOrDefault();
            lbMonthlyTo.Text = (var02 == null) ? "" : var02.Contents;
            var var03 = list.Where(x => x.ControlId.Contains("btnView_tab2")).FirstOrDefault();
            btnView.Text = (var03 == null) ? "" : var03.Contents;
            var var04 = list.Where(x => x.ControlId.Contains("btnExport_tab2")).FirstOrDefault();
            btnExport.Text = (var04 == null) ? "" : var04.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ntf.VisibleOnPageLoad = false;

        // Pi-solution
        language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();
        List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/System/Roles.aspx")).ToList();


        // Load language contents - vietnamse
        List <t_Roles>     contentList = roleBL.FindAll().ToList();
        List <t_Roles_DTO> listDTO     = new List <t_Roles_DTO>();
        int index = 0;

        foreach (var item in contentList)
        {
            listDTO.Add(new t_Roles_DTO
            {
                Id_display  = (index + 1).ToString("0000"),
                Role        = item.Role,
                Description = item.Description,
            });
            index++;
        }


        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            GridView1.DataSource = ToDataTable(listDTO);
            GridView1.DataBind();

            // Language
            var var1 = list.Where(x => x.ControlId.Contains("btnEdit")).FirstOrDefault();
            btnEdit.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("btnUpdate")).FirstOrDefault();
            btnUpdate.Text = (var2 == null) ? "" : var2.Contents;
            var var3 = list.Where(x => x.ControlId.Contains("btnAdd")).FirstOrDefault();
            btnAdd.Text = (var3 == null) ? "" : var3.Contents;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // Pi-solution developer - multi languages
        if (!IsPostBack)
        {
            language = (Session["myapplication.language"] == null) ? "vi" : Session["myapplication.language"].ToString();

            List <t_LanguageTranslate> list = languageBL.FindAll(x => x.Language == language && x.Noted.Contains("/Supervisor/Logger/DetailChart_rev1.aspx")).ToList();

            //Parse content to form
            var var1 = list.Where(x => x.ControlId.Contains("lbFrom")).FirstOrDefault();
            lbFrom.Text = (var1 == null) ? "" : var1.Contents;
            var var2 = list.Where(x => x.ControlId.Contains("lbTo")).FirstOrDefault();
            lbTo.Text = (var2 == null) ? "" : var2.Contents;

            var var3 = list.Where(x => x.ControlId.Contains("btnUpdateChart")).FirstOrDefault();
            btnUpdateChart.Value = (var3 == null) ? "" : var3.Contents;
            var var4 = list.Where(x => x.ControlId.Contains("btnClearChart")).FirstOrDefault();
            btnClearChart.Value = (var4 == null) ? "" : var4.Contents;
        }
    }