Beispiel #1
0
 private void InitializeComponent()
 {
     this.dataGridView  = new ISA.Controls.CustomGridView();
     this.NamaPemasok   = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.AlamatPemasok = new System.Windows.Forms.DataGridViewTextBoxColumn();
     ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
     this.SuspendLayout();
     //
     // dataGridView
     //
     this.dataGridView.AllowUserToAddRows          = false;
     this.dataGridView.AllowUserToDeleteRows       = false;
     this.dataGridView.BorderStyle                 = System.Windows.Forms.BorderStyle.Fixed3D;
     this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
         this.NamaPemasok,
         this.AlamatPemasok
     });
     this.dataGridView.Location      = new System.Drawing.Point(9, 67);
     this.dataGridView.MultiSelect   = false;
     this.dataGridView.Name          = "dataGridView";
     this.dataGridView.ReadOnly      = true;
     this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
     this.dataGridView.Size          = new System.Drawing.Size(577, 262);
     this.dataGridView.StandardTab   = true;
     this.dataGridView.TabIndex      = 5;
     this.dataGridView.KeyDown      += new System.Windows.Forms.KeyEventHandler(this.dataGridView_KeyDown);
     //
     // NamaPemasok
     //
     this.NamaPemasok.DataPropertyName = "Nama";
     this.NamaPemasok.HeaderText       = "Pemasok";
     this.NamaPemasok.Name             = "NamaPemasok";
     this.NamaPemasok.ReadOnly         = true;
     this.NamaPemasok.Width            = 200;
     //
     // AlamatPemasok
     //
     this.AlamatPemasok.DataPropertyName = "Alamat";
     this.AlamatPemasok.HeaderText       = "Alamat";
     this.AlamatPemasok.Name             = "AlamatPemasok";
     this.AlamatPemasok.ReadOnly         = true;
     this.AlamatPemasok.Width            = 350;
     //
     // frmSupplierLookup
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
     this.ClientSize          = new System.Drawing.Size(594, 341);
     this.Controls.Add(this.dataGridView);
     this.Location    = new System.Drawing.Point(0, 0);
     this.Name        = "frmSupplierLookup";
     this.WindowState = System.Windows.Forms.FormWindowState.Normal;
     this.Load       += new System.EventHandler(this.frmSupplierLookup_Load_1);
     this.Controls.SetChildIndex(this.dataGridView, 0);
     ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
        private void OnCustomersViewGetCustomGridPreview(object sender, GetGridPreviewEventArgs e)
        {
            GridControl gridPreview = new CustomGridControl();
            ColumnView  view        = new CustomGridView(gridPreview);

            gridPreview.MainView   = view;
            gridPreview.DataSource = CustomersBindingSource;
            e.GridPreview          = gridPreview;
            view.Columns.AddVisible("ID");
            e.GroupColumn = view.Columns.AddVisible("Name");
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        var cgvPTORequests = new CustomGridView();

        cgvPTORequests.ListClassName = typeof(PTORequestEOList).AssemblyQualifiedName;
        cgvPTORequests.AddBoundField("", "Request Date", "");

        //Check the filter type
        switch (Filter)
        {
        case FilterEnum.RequestsToApprove:
            //Get request to approve
            cgvPTORequests.LoadMethodName = "LoadByCurrentOwnerId";
            cgvPTORequests.LoadMethodParameters.Add(((BasePage)Page).CurrentUser.ID);

            //Add the requestor column.
            cgvPTORequests.AddBoundField("", "Requestor", "");
            break;

        default:
            //Default to my request if the developer forgot to set the filter property
            cgvPTORequests.LoadMethodName = "LoadByENTUserAccountId";
            cgvPTORequests.LoadMethodParameters.Add(((BasePage)Page).CurrentUser.ID);

            //Add status and current owner
            cgvPTORequests.AddBoundField("", "Status", "");
            cgvPTORequests.AddBoundField("", "Current Owner", "");
            break;
        }

        cgvPTORequests.AddBoundField("RequestTypeString", "Request Type", "");
        cgvPTORequests.RowDataBound += cgvPTORequests_RowDataBound;

        //Default the sort to the request date
        cgvPTORequests.SortExpressionLast = "RequestDate";
        cgvPTORequests.DataBind();
        Controls.Add(cgvPTORequests);
    }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.listView1 = new CustomGridView();
     this.MessageId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.Url = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.ParseDedication = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.Status = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.Error = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.textBoxProccesses = new System.Windows.Forms.TextBox();
     this.label2 = new System.Windows.Forms.Label();
     this.menuStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // menuStrip1
     //
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.fileToolStripMenuItem});
     this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     this.menuStrip1.Name = "menuStrip1";
     this.menuStrip1.Size = new System.Drawing.Size(1116, 24);
     this.menuStrip1.TabIndex = 4;
     this.menuStrip1.Text = "menuStrip1";
     //
     // fileToolStripMenuItem
     //
     this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.clearToolStripMenuItem});
     this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
     this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
     this.fileToolStripMenuItem.Text = "File";
     //
     // clearToolStripMenuItem
     //
     this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
     this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
     this.clearToolStripMenuItem.Text = "Clear";
     this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
     //
     // listView1
     //
     this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
     this.MessageId,
     this.Url,
     this.ParseDedication,
     this.Status,
     this.Error});
     this.listView1.GridLines = true;
     this.listView1.Location = new System.Drawing.Point(12, 67);
     this.listView1.Name = "listView1";
     this.listView1.Size = new System.Drawing.Size(1092, 317);
     this.listView1.TabIndex = 3;
     this.listView1.UseCompatibleStateImageBehavior = false;
     this.listView1.View = System.Windows.Forms.View.Details;
     //
     // MessageId
     //
     this.MessageId.Text = "Id";
     this.MessageId.Width = 186;
     //
     // Url
     //
     this.Url.Text = "Url";
     //
     // ParseDedication
     //
     this.ParseDedication.Text = "Parse Dedication";
     this.ParseDedication.Width = 148;
     //
     // Status
     //
     this.Status.Text = "Status";
     this.Status.Width = 127;
     //
     // Error
     //
     this.Error.Text = "Error";
     this.Error.Width = 127;
     //
     // textBoxProccesses
     //
     this.textBoxProccesses.BackColor = System.Drawing.SystemColors.Info;
     this.textBoxProccesses.Location = new System.Drawing.Point(93, 30);
     this.textBoxProccesses.Name = "textBoxProccesses";
     this.textBoxProccesses.ReadOnly = true;
     this.textBoxProccesses.Size = new System.Drawing.Size(111, 20);
     this.textBoxProccesses.TabIndex = 7;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(22, 33);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(65, 13);
     this.label2.TabIndex = 8;
     this.label2.Text = "Proccesses:";
     //
     // MainForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1116, 396);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.textBoxProccesses);
     this.Controls.Add(this.listView1);
     this.Controls.Add(this.menuStrip1);
     this.MainMenuStrip = this.menuStrip1;
     this.Name = "MainForm";
     this.Text = "GoldDigger";
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }