Beispiel #1
0
        private void btSaveGrid_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                SysTable stb = new SysTable();
                foreach (CDTGridColumn col in gvMain.Columns)
                {
                    if (!col.isExCol)
                    {
                        stb.UpdateColWidth(col.MasterRow, col.Width);
                    }
                    stb.UpdateColIndex(col.MasterRow, col.VisibleIndex);
                    stb.UpdateColVisible(col.MasterRow, col.Visible ? 1 : 0);
                }
                for (int i = 0; i < this._frmDesigner._gcDetail.Count; i++)
                {
                    GridControl gr = this._frmDesigner._gcDetail[i];
                    GridView    gv = gr.MainView as GridView;

                    foreach (CDTGridColumn col in gv.Columns)
                    {
                        if (!col.isExCol)
                        {
                            stb.UpdateColWidth(col.MasterRow, col.Width);
                        }
                        stb.UpdateColIndex(col.MasterRow, col.VisibleIndex);
                        stb.UpdateColVisible(col.MasterRow, col.Visible ? 1 : 0);
                    }
                }
            }
            catch { }
        }
        void btSaveGrid_ItemPress(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool admin = bool.Parse(Config.GetValue("Admin").ToString());

            if (!admin)
            {
                return;
            }
            try
            {
                SysTable stb = new SysTable();
                foreach (CDTGridColumn col in gvMain.Columns)
                {
                    if (!col.isExCol)
                    {
                        stb.UpdateColWidth(col.MasterRow, col.Width);
                    }
                    stb.UpdateColIndex(col.MasterRow, col.VisibleIndex);
                    stb.UpdateColVisible(col.MasterRow, col.Visible ? 1 : 0);
                }
                for (int i = 0; i < this._frmDesigner._gcDetail.Count; i++)
                {
                    GridControl gr = this._frmDesigner._gcDetail[i];
                    GridView    gv = gr.MainView as GridView;

                    foreach (CDTGridColumn col in gv.Columns)
                    {
                        if (!col.isExCol)
                        {
                            stb.UpdateColWidth(col.MasterRow, col.Width);
                        }
                        stb.UpdateColIndex(col.MasterRow, col.VisibleIndex);
                        stb.UpdateColVisible(col.MasterRow, col.Visible ? 1 : 0);
                    }
                }
            }
            catch { }
        }
Beispiel #3
0
        private void btSaveGrid_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SysTable stb = new SysTable();

            foreach (CDTGridColumn col in gvMain.Columns)
            {
                if (!col.isExCol)
                {
                    stb.UpdateColWidth(col.MasterRow, col.Width);
                }
                stb.UpdateColIndex(col.MasterRow, col.VisibleIndex);
                stb.UpdateColVisible(col.MasterRow, col.Visible ? 1 : 0);
            }
        }