Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Utils.MetricUtils.InitLinqDataSources(ldsPerformanceIndicatorForm);
     if (PerformanceIndicatorFormID != Guid.Empty)
     {
         ldsPerformanceIndicatorForm.WhereParameters.Add("PerformanceIndicatorFormID", System.Data.DbType.Guid, PerformanceIndicatorFormID.ToString());
         mfPerformanceIndicatorForm.ChangeMode(DetailsViewMode.Edit);
     }
     else
     {
         // init name box with saved name value
         string sName = String.Empty;
         if (Session[MetricTrac.Utils.MetricUtils.SessionObjectNameForPIFormName] != null)
         {
             sName = (string)Session[MetricTrac.Utils.MetricUtils.SessionObjectNameForPIFormName];
         }
         if (!IsPostBack && !String.IsNullOrEmpty(sName))
         {
             ((TextBoxField)mfPerformanceIndicatorForm.Fields[0]).DefaultText = sName;
         }
         Session[MetricTrac.Utils.MetricUtils.SessionObjectNameForPIFormName] = null;
     }
     mfPerformanceIndicatorForm.Fields[2].Visible = mfPerformanceIndicatorForm.CurrentMode != DetailsViewMode.Insert;
 }
Esempio n. 2
0
 protected void cgvPerformanceIndicator_Action(object sender, Micajah.Common.WebControls.CommonGridViewActionEventArgs e)
 {
     if (e.Action != CommandActions.Add)
     {
         return;
     }
     if (ListMode == MetricTrac.Bll.PerformanceIndicatorListMode.List)
     {
         Response.Redirect("PerformanceIndicatorEdit.aspx?IsNew=True");
     }
     else
     {
         if (Request.Params["ctl00$PageBody$mfPerformanceIndicatorForm$ctl01$txt"] != null)
         {
             Session[Utils.MetricUtils.SessionObjectNameForPIFormName] = Request.Params["ctl00$PageBody$mfPerformanceIndicatorForm$ctl01$txt"].ToString();
         }
         Response.Redirect(String.Format("PIFPIJunc.aspx?PerformanceIndicatorFormID={0}", PerformanceIndicatorFormID.ToString()));
     }
 }
Esempio n. 3
0
 protected void lbOrgTreeJunc_Click(object sender, EventArgs e)
 {
     if (Request.Params["ctl00$PageBody$mfPerformanceIndicatorForm$ctl01$txt"] != null)
     {
         Session[Utils.MetricUtils.SessionObjectNameForPIFormName] = Request.Params["ctl00$PageBody$mfPerformanceIndicatorForm$ctl01$txt"].ToString();
     }
     Response.Redirect(String.Format("PIFOrgLocationJunc.aspx?PerformanceIndicatorFormID={0}", PerformanceIndicatorFormID.ToString()));
 }