Exemple #1
0
 private void BindPossibleValuesTable()
 {
     ViewState["Source"] = "PossibleValues";
     using (InputFormValueList lg = ifContainer.PossibleValues){
         if (lg != null)
         {
             dg.DataSource = lg;
             Utils.InitGridSort(ref dg, false);
             dg.DataBind();
             //ACQ10.0 Starts
             UltraGridRow row = new UltraGridRow();
             dg.Rows.Insert(0, row);
             dg.Rows[0].Cells.FromKey("Id").Value      = 0;
             dg.Rows[0].Cells.FromKey("Id").Text       = "0";
             dg.Rows[0].Cells.FromKey("InScope").Value = false;
             dg.Rows[0].Cells.FromKey("cChoose").Text  = "<input id='rd' type='radio' name='rd' value='##BLANK##' onclick='dc()'/>";
             dg.Rows[0].Cells.FromKey("Value").Text    = "##BLANK##";
             dg.Rows[0].Cells.FromKey("Comment").Text  = "To authour ILB ";
             //ACQ10.0 Ends
             if (!Page.IsPostBack)
             {
                 if (chunk != null)
                 {
                     if (chunk.Text == HyperCatalog.Business.Chunk.BlankValue || chunk.Text == HyperCatalog.Business.Chunk.BlankText)
                     {
                         if (bMultiChoice)
                         {
                             //dg.Columns.FromKey("InScope").ServerOnly = uwToolbar.Items.FromKeyButton("ilb").Selected = true;
                             dg.Rows[0].Cells.FromKey("cChoose").Text  = "<input id='rd' type='radio' name='rd' value='##BLANK##' checked onclick='dc()'/>";
                             dg.Rows[0].Cells.FromKey("InScope").Value = true;
                         }
                         else
                         {
                             //dg.Columns.FromKey("cChoose").ServerOnly = uwToolbar.Items.FromKeyButton("ilb").Selected = true;
                             dg.Rows[0].Cells.FromKey("cChoose").Text = "<input id='rd' type='radio' name='rd' value='##BLANK##' checked onclick='dc()'/>";
                         }
                     }
                 }
             }
         }
     }
 }
    // Display data
    protected void UpdateDataEdit()
    {
        using (InputFormValueList valuesList = InputFormValue.GetAll("InputFormContainerId = " + InputFormContainerId))
        {
            dgValues.DataSource = valuesList;
            Utils.InitGridSort(ref dgValues, false);
            dgValues.DataBind();
            Utils.EnableIntelligentSort(ref dgValues, Convert.ToInt32(txtSortColPos.Value));

            if (valuesList.Count > 0)
            {
                if (SessionState.User.HasCapability(CapabilitiesEnum.MANAGE_CARTOGRAPHY))
                {
                    UITools.ShowToolBarButton(uwToolbar, "Delete");
                    UITools.ShowToolBarSeparator(uwToolbar, "DeleteSep");
                }
            }
            else
            {
                UITools.HideToolBarButton(uwToolbar, "Delete");
                UITools.HideToolBarSeparator(uwToolbar, "DeleteSep");
            }
        }
    }