コード例 #1
0
        private void GridGroupCount_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("C1");
            dt.Columns.Add("C2");
            dt.Columns.Add("C3");



            dt.Rows.Add("A", "D", 1);
            dt.Rows.Add("A", "D", 1);
            dt.Rows.Add("A", "F", 1);
            dt.Rows.Add("A", "F", 1);


            dt.Rows.Add("B", "J", 1);
            dt.Rows.Add("B", "J", 1);
            dt.Rows.Add("B", "H", 1);
            dt.Rows.Add("B", "H", 1);

            this.gridControl1.DataSource = dt;

            Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.gridControl1, this.gridView1);
            gs.AddColumn("C1", "C1", Cls.Grid._ColumnType.Default, 80, Cls.Grid._ColumnAlign.Center);
            gs.AddColumn("C2", "C2", Cls.Grid._ColumnType.Default, 80, Cls.Grid._ColumnAlign.Center);
            gs.AddColumn("C3", "C3", Cls.Grid._ColumnType.Default, 80, Cls.Grid._ColumnAlign.Center);
        }
コード例 #2
0
        private void frmBiz_Load(object sender, EventArgs e)
        {
            try
            {
                Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.grid, this.gridView);
                gs.AddColumn("사업장코드", "BIZ_CODE", Cls.Grid._ColumnType.Default, 100, Cls.Grid._ColumnAlign.Center, true);
                gs.AddColumn("사업장이름", "BIZ_NAME", Cls.Grid._ColumnType.Default, 120, Cls.Grid._ColumnAlign.Left, true);
                gs.AddColumn("사업장코드", "BIZ_NO", Cls.Grid._ColumnType.Default, 100, Cls.Grid._ColumnAlign.Center, true);

                Cls.Grid.Options.SelectedRow(this.gridView);
                Cls.Grid.Options.EmbeddedNavigater(this.grid);

                this.grid.DataSource = dtBizs;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
        private void frmGridStyle_RTF_Load(object sender, EventArgs e)
        {
            this.gridView1.OptionsView.RowAutoHeight   = true;
            this.gridView1.OptionsView.ColumnAutoWidth = true;
            dt.Columns.Add("CNT", typeof(decimal));
            //dt.Columns.Add("STREAM" , typeof(byte[]));
            dt.Columns.Add("STREAM");

            Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.gridControl1, this.gridView1);

            gs.AddColumn("카운트", "CNT", Cls.Grid._ColumnType.Numbers, 60, Cls.Grid._ColumnAlign.Right, true);
            gs.AddColumn("문서", "STREAM", Cls.Grid._ColumnType.RichEdit, 300, Cls.Grid._ColumnAlign.Left, true);

            RepositoryItemRichTextEdit rich = ( RepositoryItemRichTextEdit)this.gridView1.Columns["STREAM"].ColumnEdit;

            rich.CustomHeight = -1;
            //rich.DocumentFormat = DocumentFormat.Rtf;
            //rich.CustomDisplayText += new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(rich_CustomDisplayText);

            this.gridControl1.DataSource = dt;
        }
コード例 #4
0
        private void Grid_ColumnType_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("C1");
                dt.Columns.Add("C2", typeof(string), "C1");

                dt.Rows.Add(new object[] { "20" });

                this.gridControl1.DataSource = dt;

                Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.gridControl1, gridView1);

                gs.AddColumn("C1", "C1", Cls.Grid._ColumnType.Default, 120, Cls.Grid._ColumnAlign.Center, true, true);
                gs.AddColumn("C2", "C2", Cls.Grid._ColumnType.Progressbar, 120, Cls.Grid._ColumnAlign.Center);
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
コード例 #5
0
        /// <summary>
        /// 그리드를 셋팅합니다.
        /// </summary>
        /// <param name="grd">그리드 컨트롤.</param>
        /// <param name="gridview">그리드뷰컨트롤.</param>
        /// <param name="dt">데이터소스</param>
        private void SetDataTable(DevExpress.XtraGrid.GridControl grd,
                                  DevExpress.XtraGrid.Views.Grid.GridView gridview,
                                  CodeType type)
        {
            try
            {
                string code = "";
                if (type == CodeType.L)
                {
                    code = "TYPE_CODE_L";
                }
                else if (type == CodeType.M)
                {
                    code = "TYPE_CODE_M";
                }
                else if (type == CodeType.S)
                {
                    code = "TYPE_CODE_S";
                }

                Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(grd, gridview);
                gs.AddColumn("코드", "CUST_TYPE_CODE", Cls.Grid._ColumnType.Default, 50, Cls.Grid._ColumnAlign.Center, false);
                gs.AddColumn("코드", code, Cls.Grid._ColumnType.Default, 50, Cls.Grid._ColumnAlign.Center);
                gs.AddColumn("코드명", "CUST_TYPE_NAME", Cls.Grid._ColumnType.Default, 100, Cls.Grid._ColumnAlign.Left);
                gs.AddColumn("정렬순서", "USE_SORT", Cls.Grid._ColumnType.Default, 80, Cls.Grid._ColumnAlign.Center);
                gs.AddColumn("사용여부", "USE_YN_NAME", Cls.Grid._ColumnType.Default, 80, Cls.Grid._ColumnAlign.Center);

                Cls.Grid.Options.SelectedRow(gridview);
                Cls.Grid.Options.EmbeddedNavigater(grd);
                Cls.Grid.Options.FilterRow(gridview, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #6
0
ファイル: JFAAI03.cs プロジェクト: oopsha/eldorado-rms-backup
        private void timer1_Tick(object sender, EventArgs e)
        {
            try
            { this.gridControl1.Visible = false;
              this.timer1.Enabled       = false;
              Basic.SetCursor(this, true);

              DataTable dtParm = DataLayer.GetDataTableParameter(DataLayer.DatatableStyle.Parameter);
              dtParm.Rows.Add(new object[] { "V_RECE_PAY_NO", _recepayno });

              DataSet dsTmp = DataLayer.ExecuteSpDataset("PKG_JFAAI01.PR_04", dtParm, DataLayer.MessageEncoding.Default);


              /*
               *  dt.Columns.Add("RECE_PAY_NO"      );
               *  dt.Columns.Add("CARD_NO"          );
               *  dt.Columns.Add("VAILD_THRU"       );
               *  dt.Columns.Add("INSTALLMENT_CNT"  ,typeof(decimal));
               *  dt.Columns.Add("AGREE_YN"         );
               *  dt.Columns.Add("AGREE_NO"         );
               *  dt.Columns.Add("CARD_CO_CODE"     );
               *  dt.Columns.Add("CARD_CO_NAME"     );
               *  dt.Columns.Add("AGREE_DATE"       );
               * ;
               */

              DataTable dt = new DataTable();
              dt.Columns.Add("TEXT");
              dt.Columns.Add("VALUE");

              for (int i = 0; i < dsTmp.Tables[0].Columns.Count; i++)
              {
                  string txt = dsTmp.Tables[0].Columns[i].ColumnName.ToString().Trim();
                  string val = dsTmp.Tables[0].Rows[0][i].ToString().Trim();
                  dt.Rows.Add(new  object[] { txt, val });
              }

              Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.gridControl1, this.gridView1);
              gs.AddColumn("항목", "TEXT", Cls.Grid._ColumnType.Default, 120, Cls.Grid._ColumnAlign.Left);
              gs.AddColumn("내역", "VALUE", Cls.Grid._ColumnType.Default, 120, Cls.Grid._ColumnAlign.Left);


              this.gridControl1.DataSource = dt;

              cardinfo.orgagreeno     = dsTmp.Tables[0].Rows[0]["승인일자"].ToString().Trim();
              cardinfo.cardcocode     = dsTmp.Tables[0].Rows[0]["매입사코드"].ToString().Trim();
              cardinfo.cardconame     = dsTmp.Tables[0].Rows[0]["매입사명"].ToString().Trim();
              cardinfo.cardno         = dsTmp.Tables[0].Rows[0]["카드번호"].ToString().Trim();
              cardinfo.installmentcnt = dsTmp.Tables[0].Rows[0]["할부개월"].ToString().Trim();
              cardinfo.validthru      = dsTmp.Tables[0].Rows[0]["유효기간"].ToString().Trim(); }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
                this.Close();
            }
            finally
            {
                this.gridControl1.Visible = true;

                Basic.SetCursor(this, true);
            }
        }
コード例 #7
0
        private void btnCheck_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtPwd.Text.Trim() == "")
                {
                    return;
                }
                if (!Basic.GetAdminPwdCheck(txtPwd.Text.Trim()))
                {
                    Basic.ShowMessage(1, "비밀번호가 틀렸습니다.=[5]= ");
                    return;
                }

                this.gridControl2.Visible  = true;
                this.gridControl1.Visible  = true;
                this.panelControl2.Visible = true;
                this.panelControl1.Visible = false;
                this.panelControl3.Visible = true;



                Cls.Grid.GridStyle gs = new Cls.Grid.GridStyle(this.gridControl1, this.gridView1);

                gs.AddColumn("코드", "BIZ_CODE", Cls.Grid._ColumnType.Default, 40, Cls.Grid._ColumnAlign.Center);
                gs.AddColumn("사업장", "BIZ_NAME", Cls.Grid._ColumnType.Default, 100, Cls.Grid._ColumnAlign.Left);
                gs.AddColumn("다운로드 URL", "FILE_URI", Cls.Grid._ColumnType.Default, 200, Cls.Grid._ColumnAlign.Left, true, true);
                gs.AddColumn("통신서버 URL", "DB_URI", Cls.Grid._ColumnType.Default, 200, Cls.Grid._ColumnAlign.Left, true, true);


                Cls.Grid.GridStyle gs1 = new Cls.Grid.GridStyle(this.gridControl2, this.gridView2);

                gs1.AddColumn("코드", "VAN_TYPE", Cls.Grid._ColumnType.Default, 40, Cls.Grid._ColumnAlign.Center);
                gs1.AddColumn("코드명", "VAN_NAME", Cls.Grid._ColumnType.Default, 60, Cls.Grid._ColumnAlign.Left);
                gs1.AddColumn("리얼서버IP", "SERVER_IP", Cls.Grid._ColumnType.Default, 200, Cls.Grid._ColumnAlign.Left, true, true);
                gs1.AddColumn("리얼서버Port", "SERVER_PORT", Cls.Grid._ColumnType.Default, 60, Cls.Grid._ColumnAlign.Left, true, true);
                gs1.AddColumn("테스트서버IP", "TEST_IP", Cls.Grid._ColumnType.Default, 200, Cls.Grid._ColumnAlign.Left, true, true);
                gs1.AddColumn("테스트서버Port", "TEST_PORT", Cls.Grid._ColumnType.Default, 60, Cls.Grid._ColumnAlign.Left, true, true);
                gs1.AddColumn("테스트서버TID", "TEST_TID", Cls.Grid._ColumnType.Default, 60, Cls.Grid._ColumnAlign.Left, true, true);



                DataTable dts = Parm.mDataTable.dtConnectInfo.Copy();

                this.gridControl1.DataSource = dts;

                DataTable dty = Parm.mDataTable.dtVanInfo.Copy();

                this.gridControl2.DataSource = dty;


                //dts.Columns.Add("DownLoad");
                //dts.Columns.Add("DataBase");
                //dts.Columns.Add("Change");

                //for(int i = 0; i < dts.Rows.Count; i++)
                //{
                //    dts.Rows[i]["DownLoad"] = "파일수정";
                //    dts.Rows[i]["DataBase"] = "파일수정";
                //    dts.Rows[i]["Change"]   = "변수할당";
                //}

                //Cls.Grid.Options.FixedColumn(this.gridView1,new string[]{ "DownLoad" ,"DataBase" ,  "Change"}, Cls.Grid.PositionStyle.Left);

                //Cls.Grid.Options.SetColumnColor( this.gridView1, Cls.Grid.StyleFormatConditionType.Column ,
                //                                 this.gridView1.Columns["DataBase"], DevExpress.XtraGrid.FormatConditionEnum.GreaterOrEqual , Color.Pink, null);

                //Cls.Grid.Options.SetColumnColor( this.gridView1, Cls.Grid.StyleFormatConditionType.Column ,
                //                                 this.gridView1.Columns["DownLoad"], DevExpress.XtraGrid.FormatConditionEnum.GreaterOrEqual , Color.Pink, null);

                //Cls.Grid.Options.SetColumnColor( this.gridView1, Cls.Grid.StyleFormatConditionType.Column ,
                //                                 this.gridView1.Columns["Change"], DevExpress.XtraGrid.FormatConditionEnum.GreaterOrEqual , Color.LightBlue, null);
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }