protected void Page_Load(object sender, EventArgs e) { if (!Auth.ReturnPermission("REPORT", "PROJECT_ALL")) { Auth.CheckPermission("REPORT", "PROJECT_FORCED"); } // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { DDLManager.SelectedIndex = 0; /* Popola dropdown con i valori */ popolaPeriodo(ref DDLPeriodo); /* default */ if (Session["SelectedPeriod"] != null) { DDLPeriodo.SelectedIndex = Convert.ToInt16(Session["SelectedPeriod"].ToString()); DDLProgetto.SelectedIndex = Convert.ToInt16(Session["SelectedProject"].ToString()); DDLManager.SelectedIndex = Convert.ToInt16(Session["SelectedManager"].ToString()); DDLCliente.SelectedIndex = Convert.ToInt16(Session["SelectedCliente"].ToString()); } } }
protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); Auth.CheckPermission("REPORT", "PROJECT_FORCED"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // se non ADMIN o MANAGER spegne il tasto Chargeable if (!Auth.ReturnPermission("REPORT", "PEOPLE_ALL")) { btChargeable.Visible = false; } // inizializza bottoni toggle e DDL Persone e Progetti if (!IsPostBack) { InitPage(); } if (!IsPostBack) { // Popola dropdown con i valori ASPcompatility.SelectYears(ref DDLFromYear); ASPcompatility.SelectYears(ref DDLToYear); ASPcompatility.SelectMonths(ref DDLFromMonth, CurrentSession.Language); ASPcompatility.SelectMonths(ref DDLToMonth, CurrentSession.Language); } }
protected void Page_Load(object sender, EventArgs e) { Auth.ReturnPermission("REPORT", "CURRICULA"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("DATI", "ORE"); Auth.CheckPermission("DATI", "SPESE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // imposta session variables SetVariables(); // Cambia inpostazioni controlli su schermo; ChangeScreen(); // gestisce creazione record per drag&drop - SOSTITUITA DA SERVIZIO FRONTEND //if (Request["__EVENTTARGET"] == "drag&drop") //{ // ProcessDragDrop(Request["__EVENTARGUMENT"]); //} if ((string)Session["type"] == "bonus") { BindDDLProjects(); } }
protected void Page_Load(object sender, EventArgs e) { string sAnnoCorrente; // autority check in funzione del tipo chiamata della pagina Auth.CheckPermission("ADMIN", "CUTOFF"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // se premuto CancelButton torna indietro if (Request.Form["CancelButton"] != null) { Response.Redirect("/timereport/menu.aspx"); } // se parametro di chiamata è vuoto mette default l'anno corrent if (String.IsNullOrEmpty(Request.QueryString["anno"])) { sAnnoCorrente = DateTime.Now.Year.ToString(); } else { sAnnoCorrente = Request.QueryString["anno"]; } // valorizza testo e riferimenti sui tasti di navigazione in testata del box con i mesi btNext.NavigateUrl = "/timereport/report/checkInput/check-input-select.aspx?anno=" + (Convert.ToInt16(sAnnoCorrente) + 1).ToString(); btPrev.NavigateUrl = "/timereport/report/checkInput/check-input-select.aspx?anno=" + (Convert.ToInt16(sAnnoCorrente) - 1).ToString(); AnnoCorrente.Text = sAnnoCorrente; // disegna la tabella dei mesi CostruisciTabellaMesi(sAnnoCorrente); }
protected void Page_Load(object sender, EventArgs e) { // Autorizzazione di display o creazione if (!Auth.ReturnPermission("MASTERDATA", "PROJECT_ALL")) { Auth.CheckPermission("MASTERDATA", "PROJECT_FORCED"); } // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // Inizializza elementi form if (!Page.IsPostBack) { InizializzaForm(); } // Imposta query selezione ImpostaQuery(); // Se manager cancella bottone crea if (!Auth.ReturnPermission("MASTERDATA", "PROJECT_ALL")) { btn_crea.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("BASE", "MENU"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; }
protected void Page_Load(object sender, EventArgs e) { // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; Utilities.CheckAutMobile(CurrentSession.UserLevel, MyConstants.AUTH_EXTERNAL); }
protected void Page_Load(object sender, EventArgs e) { // Autorizzazione di display o creazione Auth.CheckPermission("TRAINING", "RATE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; }
protected void Page_Load(object sender, EventArgs e) { // if (!Auth.ReturnPermission("WORKFLOW", "TOTALE")) // Accedono solo manager o Admind // Auth.CheckPermission("WORKFLOW", "MANAGER"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("STARTAWS", "DISPLAY"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; //SetPageData(); }
protected void Page_Load(object sender, EventArgs e) { if (!Auth.ReturnPermission("REPORT", "PROJECT_ALL")) { Auth.CheckPermission("REPORT", "PROJECT_FORCED"); } // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; }
protected void Page_Load(object sender, EventArgs e) { // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { Bind_DDLprogetto(); Bind_DDLNotifica(); } }
protected void Page_Init(object sender, EventArgs e) { // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // Carica la griglia dei risultati if (!IsPostBack) { Page_setup(); } CostruiciGriglia(); }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("BASE", "MENU"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { BackgroundColor.Value = CurrentSession.BackgroundColor; BackgroundImg.Value = CurrentSession.BackgroundImage; } }
protected void Page_Load(object sender, EventArgs e) { CurrentSession = (TRSession)Session["CurrentSession"]; // recupera oggetto con variabili di sessione if (!IsPostBack) { // Popola dropdown con i valori ASPcompatility.SelectYears(ref DDLFromYear); ASPcompatility.SelectYears(ref DDLToYear); ASPcompatility.SelectMonths(ref DDLFromMonth, CurrentSession.Language); ASPcompatility.SelectMonths(ref DDLToMonth, CurrentSession.Language); } }
protected void Page_Load(object sender, EventArgs e) { // Authorization level 3 needed for this function Auth.CheckPermission("MASTERDATA", "PERSONE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (Request["cancel_from_list"] == "Cancel") { Response.Redirect("/timereport/menu.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { // Autorizzazione di display o creazione Auth.CheckPermission("MASTERDATA", "COSTRATE_DISPLAY"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!Auth.ReturnPermission("MASTERDATA", "COSTRATE_UPDATE")) { btn_crea.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { string sSQL = ""; string sSQL2 = ""; string sPath = ""; // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; string SReportType = Request["ReportName"] != null ? Request["ReportName"].ToString() : ""; if (!IsPostBack) { // determina tipo report da parametro di lancio switch (SReportType) { case "HR_CourseCatalog": sSQL = "SELECT * FROM V_COURSE Where active = 'true'"; sPath = "/timereport/report/Rdlc/HR_CourseCatalog.rdlc"; break; default: sSQL = Session["SQL"].ToString(); sPath = Session["ReportPath"].ToString(); break; } DataTable dtData = Database.GetData(sSQL, null); RVReport.LocalReport.DataSources.Clear(); RVReport.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSetReport", dtData)); RVReport.LocalReport.ReportPath = Server.MapPath(sPath); DataTable dtData2; if (Session["SQL2"] != null) { sSQL2 = Session["SQL2"].ToString(); dtData2 = Database.GetData(sSQL2, null); // se il report ha un secondo dataset RVReport.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSetReport2", dtData2)); } // se un report revenue setta la versione if (sPath.Substring(0, 3) == "REV") { ReportParameter[] parameters = new ReportParameter[1]; parameters[0] = new ReportParameter("RevenueVersion", Session["RevenueVersion"].ToString()); RVReport.LocalReport.SetParameters(parameters); } } }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("TRAINING", "REPORT"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { /* Popola dropdown con i valori */ ASPcompatility.SelectYears(ref DDLAnno); DDLAnno.SelectedIndex = 0; } }
protected void Page_Load(object sender, EventArgs e) { // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (Request.QueryString["TableName"] == "Expenses") { CancelButton.PostBackUrl = "/timereport/input-spese.aspx?action=fetch&expenses_id=" + Request.QueryString["RecordId"]; } else { CancelButton.PostBackUrl = "/timereport/input-ore.aspx?action=fetch&Hours_id=" + Request.QueryString["RecordId"]; } }
protected void Page_Load(object sender, EventArgs e) { // Autorizzazione di display o creazione Auth.CheckPermission("TRAINING", "CHANGE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { /* Popola dropdown con i valori */ ASPcompatility.SelectYears(ref DDLAnno); } }
public static CultureInfo GetCulture() { // PROVATA IN SOSTITUZIONE DI GLOBAL.ASAX CultureInfo sRet = new CultureInfo("it"); TRSession CurrentSession = (TRSession)HttpContext.Current.Session["CurrentSession"]; if (CurrentSession.Language == "en") { sRet = new CultureInfo("en"); } return(sRet); }
public static Tuple <int, int> GetManagerAndAccountId(int Projects_id) { TRSession CurrentSession = (TRSession)HttpContext.Current.Session["CurrentSession"]; DataRow[] rows = CurrentSession.dtProgettiForzati.Select("Projects_id = " + Projects_id); var tuple = new Tuple <int, int>(0, 0); if (rows.Count() == 1) { tuple = new Tuple <int, int>(Convert.ToInt32(rows[0]["ClientManager_id"]), Convert.ToInt32(rows[0]["AccountManager_id"])); } return(tuple); }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("MASTERDATA", "WBS"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // Inizializza elementi form if (!Page.IsPostBack) { InizializzaForm(); } // Imposta query selezione ImpostaQuery(); }
protected void Page_Load(object sender, EventArgs e) { // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { sPersonaSelezionata = Request["IdPersonaSelezionata"].ToString(); // recupera nome DataRow drPersons = Database.GetRow("Select Name from Persons where Persons_id=" + sPersonaSelezionata, this.Page); sNomeConsulente = drPersons["name"].ToString(); } Auth.CheckPermission("MASTERDATA", "PERSONE"); }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("MASTERDATA", "PERSONE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { if (Request.QueryString["Persons_Id"] != null) { FVPersone.ChangeMode(FormViewMode.Edit); FVPersone.DefaultMode = FormViewMode.Edit; } } }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("MASTERDATA", "CUSTOMER"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; if (!IsPostBack) { if (Request.QueryString["CodiceCliente"] != null) { SchedaClienteForm.ChangeMode(FormViewMode.Edit); SchedaClienteForm.DefaultMode = FormViewMode.Edit; } } }
protected void Page_Load(object sender, EventArgs e) { // Autorizzazione di display o creazione Auth.CheckPermission("CONFIG", "TABLE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // imposta la selezione della DDL progettlo if (!IsPostBack) { DSProgetto.SelectCommand = "SELECT Projects_id, ProjectCode + ' ' + Name as ProjectName FROM Projects WHERE Active = 1 AND ( ProjectType_Id='" + ConfigurationManager.AppSettings["PROGETTO_INTERNAL_INVESTMENT"] + "'" + "OR ProjectType_Id='" + ConfigurationManager.AppSettings["PROGETTO_BUSINESS_DEVELOPMENT"] + "'" + "OR ProjectType_Id='" + ConfigurationManager.AppSettings["PROGETTO_INFRASTRUCTURE"] + "' ) " + " ORDER BY ProjectCode"; } }
protected void Page_Load(object sender, EventArgs e) { Auth.CheckPermission("CONFIG", "TABLE"); // recupera oggetto con variabili di sessione CurrentSession = (TRSession)Session["CurrentSession"]; // Imposta modalità display SetDisplayMode(); // imposta default sede if (!IsPostBack && Session["DDLSede"] != null) { DropDownList DDLSede = (DropDownList)FVForm.FindControl("DDLSede"); DDLSede.SelectedValue = Session["DDLSede"].ToString(); } }