Пример #1
0
    public void newGridPanel(string ParentID)
    {
        DataTable dtContent = new DataTable();

        if (GridIndex == 0)
        {
            dtContent = sema.dtContentGridHeader;
        }
        else if (GridIndex == 1)
        {
            dtContent = sema.dtContentGridFooter;
        }
        else
        {
            //hata
        }
        DataTable dtProperties;

        using (GridPanelUtility gpu = new GridPanelUtility())
        {
            dtProperties = gpu.getColumns(ParentID);
            gpu.FillGridwithDatatable(gridList[GridIndex], dtProperties, dtContent, false);
        }
        GridIndex = GridIndex + 1;
    }
Пример #2
0
    public void newWindow(string Kod)
    {
        string WindowID = sema.WindowID;

        //X.GetCmp<Panel>(panelList[1].ID).Hidden = sema.hidden;

        SqlParameter[] sqlparamArrayProp = new SqlParameter[4] {
            new SqlParameter("@InputComponent", WindowID), new SqlParameter("@InputTypeof", " "), new SqlParameter("@MinRecursionLevel", "0"), new SqlParameter("@MaxRecursionLevel", "9999")
        };
        DataTable         dtProperties = dataAccess.getSQL("getProProperties", sqlparamArrayProp);
        GridPanelUtility  gu           = new GridPanelUtility();
        PanelFieldUtility pu           = new PanelFieldUtility();

        if (dtProperties.Rows.Count > 0)
        {
            DataTable MainComponents = dtProperties.Select("RecursionLevel=0").CopyToDataTable();
            if (MainComponents.Rows.Count > 0)
            {
                for (int i = 0; i < MainComponents.Rows.Count; i++)
                {
                    string componentType = CommonFunctions.FieldOrDefault <string>(MainComponents, MainComponents.Rows[i], "TYPEOF");
                    string componentID   = CommonFunctions.FieldOrDefault <string>(MainComponents, MainComponents.Rows[i], "COMPONENT_ID");

                    switch (componentType)
                    {
                    case "Gridpanel":
                        newGridPanel(componentID);
                        break;

                    case "Panel":
                        newPanel(componentID);
                        break;

                    case " ":
                        //hata ver
                        break;

                    default:
                        //hata ver
                        break;
                    }
                }
            }
            else
            {
                //hata ver
            }
        }
        else
        {
            //hata ver
        }
    }