/// <summary>
        /// Delete the relation between IF and the current item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Delete_Click(object sender, ImageClickEventArgs e)
        {
            if (sender != null)
            {
                Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.ImageButton)sender).Parent);
                int inputFormId = Convert.ToInt32(cellItem.Cell.Row.Cells.FromKey("InputFormId").Text);

                //Modified for the QC# 938
                if (itemObj.DeleteInputFormUser(inputFormId, SessionState.User.Id))
                //Modified for the QC# 938
                {
                    // Refresh candidates
                    UpdateCandidates();

                    // Refresh frame content
                    if (SessionState.CurrentItem != null)
                    {
                        SessionState.CurrentItem.InputForms = null;
                    }
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ReloadQDEContent", "<script>ReloadQDEContent(" + itemId.ToString() + ", '" + SessionState.Culture.Code + "');</script>");
                }
                else
                {
                    lbError.CssClass = "hc_error";
                    lbError.Text     = Item.LastError;
                    lbError.Visible  = true;
                }
            }
        }
Beispiel #2
0
        protected void UpdateGridItem(object sender, System.EventArgs e)
        {
            Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
            string regionCode = cellItem.Cell.Row.Cells.FromKey("RegionCode").Text;

            UpdateDataEdit(regionCode);

            Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "UpdateCurrentRegion", "UpdateCurrentRegion('" + regionCode + "')", true);
        }
Beispiel #3
0
    // "Name" Link Button event handler
    protected void UpdateGridItem(object sender, System.EventArgs e)
    {
        if (sender != null)
        {
            Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
            string sInputFormContainerId = cellItem.Cell.Row.Cells.FromKey("InputFormContainerId").Text;

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Update", "<script>SC(" + sInputFormContainerId + ");</script>");
        }
    }
Beispiel #4
0
 // "Name" Link Button event handler
 protected void UpdateGridItem(object sender, System.EventArgs e)
 {
     if (sender != null)
     {
         Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
         string sId = cellItem.Cell.Row.Cells.FromKey("Id").Text;
         sId = Utils.CReplace(sId, "<font color=red><b>", "", 1);
         sId = Utils.CReplace(sId, "</b></font>", "", 1);
         UpdateDataEdit(sId);
     }
 }
Beispiel #5
0
 protected void SelectResource_Click(object sender, System.EventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
     _currentResourceId = (int)cellItem.Cell.Row.DataKey;
     if (DisplayMode == Mode.Complete)
     {
         BindResource();
     }
     else if (DisplayMode == Mode.Minimal && CurrentResource != null)
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "1", "<script>window.returnValue='" + CurrentResource.RelativeURI + "';window.close();</script>");
     }
 }
        /*********CHANGES AS PART OF PRISM UI TO PDB CHANGES BY REKHA THOMAS*********/
        protected void DeleteButton_Click(object sender, EventArgs e) // Delete Advanced search reports directly from the saved reports list
        {
            Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.Button)sender).Parent);
            string queryName = cellItem.Cell.Row.Cells.FromKey("Name").Text + "";

            if (!string.IsNullOrEmpty(queryName))
            {
                Query = (Business.SearchQuery)Shared.SessionState.User.SearchQueries[queryName];
                if (Query != null)
                {
                    Query.Delete();
                    BindGrid();
                }
            }
        }
Beispiel #7
0
        /// <summary>
        /// Delete the relation between IF and the current item
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Delete_Click(object sender, ImageClickEventArgs e)
        {
            Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.ImageButton)sender).Parent);
            string templateName = cellItem.Cell.Row.Cells.FromKey("TemplateName").Text;

            if (itemObj.DeleteTemplate(templateName))
            {
                // Refresh candidates
                UpdateCandidates();
                if (SessionState.CurrentItem != null)
                {
                    SessionState.CurrentItem.InputForms = null;
                }
                UpdateDataView();
            }
            else
            {
                lbError.CssClass = "hc_error";
                lbError.Text     = Item.LastError;
                lbError.Visible  = true;
            }
        }
        //protected void GetPreparedExport(object sender, EventArgs e)
        //{
        //  DataSet ds = new DataSet();
        //  ds.Tables.Add("test");
        //  System.Text.StringBuilder sb = Utils.ExportDataTableToCSV(ds.Tables[0]);

        //  string stream = sb.ToString();

        //  Response.Clear();
        //  Response.ContentType = "text/plain";
        //  Response.AddHeader("Content-disposition", "attachment; filename="+((Infragistics.WebUI.UltraWebGrid.CellItem)((Button)sender).NamingContainer).Cell.Row.DataKey+".csv");
        //  Response.Write(stream);
        //  Response.End();
        //}

        #region Grid events
        protected void UpdateGridItem(object sender, System.EventArgs e)
        {
            Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
            /************Start 3.5 Release for exporting Template Search*******************/
            DataTable objDTBusinessFilters = new DataTable();

            objDTBusinessFilters.Columns.Add(new DataColumn("FilterName"));
            objDTBusinessFilters.Columns.Add(new DataColumn("FilterValue"));

            DataRow objDR = null;

            objDR    = objDTBusinessFilters.NewRow();
            objDR[0] = "Name";
            objDR[1] = cellItem.Cell.Row.Cells.FromKey("Name").Text + "";
            objDTBusinessFilters.Rows.Add(objDR);

            objDR    = objDTBusinessFilters.NewRow();
            objDR[0] = "Visibility";
            objDR[1] = ((bool)cellItem.Cell.Row.Cells.FromKey("Visibility").Value) ? "Public" : "Private";
            objDTBusinessFilters.Rows.Add(objDR);

            objDR    = objDTBusinessFilters.NewRow();
            objDR[0] = "Description";
            objDR[1] = cellItem.Cell.Row.Cells.FromKey("Description").Text + "";
            objDTBusinessFilters.Rows.Add(objDR);
            objDTBusinessFilters.AcceptChanges();

            /*
             * lstBusinessFilters.Add(new ListItem("Name",cellItem.Cell.Row.Cells.FromKey("Name").Text+""));
             * lstBusinessFilters.Add(new ListItem("Visibility", ((bool)cellItem.Cell.Row.Cells.FromKey("Visibility").Value) ? "Public" : "Private"));
             * lstBusinessFilters.Add(new ListItem("Description",cellItem.Cell.Row.Cells.FromKey("Description").Text+""));*/
            Session["selectedBusinessFilters"] = objDTBusinessFilters;
            Session["selectedCustomFilters"]   = null;
            /************End 3.5 Release for exporting Template Search*******************/
            UpdateDataEdit((string)cellItem.Cell.Row.Cells.FromKey("Name").Value);
        }
Beispiel #9
0
 /// <summary>
 /// Link to the package selected
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void UpdateGridItem(object sender, System.EventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
     UpdateDataEdit(cellItem.Cell.Row.Cells.FromKey("PackageId").Text);
 }
Beispiel #10
0
 protected void UpdateGridItem(object sender, System.EventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
     Debug.Trace("<br>UpdateGridItem for " + cellItem.Cell.Row.Cells.FromKey("CountryCode").Text, DebugSeverity.Low);
     UpdateDataEdit(cellItem.Cell.Row.Cells.FromKey("CountryCode").Text);
 }
Beispiel #11
0
 protected void GotoCountries(object sender, System.EventArgs e)
 {
     Infragistics.WebUI.UltraWebGrid.CellItem cellItem = ((Infragistics.WebUI.UltraWebGrid.CellItem)((System.Web.UI.WebControls.LinkButton)sender).Parent);
 }