Ejemplo n.º 1
0
        private void upOrdownOrDelete(string type, JCommon.MyDataGridView dGVshowProcess)
        {
            if (dGVshowProcess.CurrentRow == null)
            {
                MessageBox.Show("请选择要需要操作的工序所在行");
            }

            else if (type == "del")//删
            {
                if (MessageBox.Show("确定要删除吗?", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    dGVshowProcess.Rows.Remove(dGVshowProcess.CurrentRow);
                }
            }

            else if (type == "up")//上
            {
                if (dGVshowProcess.CurrentRow.Index <= 0)
                {
                    MessageBox.Show("此工序已在顶端,不能再上移!");
                }

                else
                {
                    int nowIndex = dGVshowProcess.CurrentRow.Index;

                    object[] _rowData = (dGVshowProcess.DataSource as DataTable).Rows[nowIndex].ItemArray;

                    (dGVshowProcess.DataSource as DataTable).Rows[nowIndex].ItemArray = (dGVshowProcess.DataSource as DataTable).Rows[nowIndex - 1].ItemArray;

                    (dGVshowProcess.DataSource as DataTable).Rows[nowIndex - 1].ItemArray = _rowData;

                    //dGVshowProcess.CurrentCell = dGVshowProcess.Rows[nowIndex - 1].Cells[0];//设定当前行
                }
            }

            else if (type == "down")//下
            {
                if (dGVshowProcess.CurrentRow.Index >= dGVshowProcess.Rows.Count - 1)
                {
                    MessageBox.Show("此工序已在底端,不能再下移!");
                }

                else
                {
                    int nowIndex = dGVshowProcess.CurrentRow.Index;

                    object[] _rowData = (dGVshowProcess.DataSource as DataTable).Rows[nowIndex].ItemArray;

                    (dGVshowProcess.DataSource as DataTable).Rows[nowIndex].ItemArray = (dGVshowProcess.DataSource as DataTable).Rows[nowIndex + 1].ItemArray;

                    (dGVshowProcess.DataSource as DataTable).Rows[nowIndex + 1].ItemArray = _rowData;

                    //dGVshowProcess.CurrentCell = dGVshowProcess.Rows[nowIndex + 1].Cells[0];//设定当前行
                }
            }
        }
Ejemplo n.º 2
0
 private void LoadData()
 {
     foreach (TabPage page in this.tabMain.TabPages)
     {
         int CompanyID = (int)page.Tag;
         JCommon.MyDataGridView dgrdv = (JCommon.MyDataGridView)page.Controls[0];
         DataTable dtblItems          = this.accOrderItems.GetDataOEMOrderItemsNonFinishedByCompanyID(CompanyID).Tables[0];
         dgrdv.DataSource = dtblItems;
     }
 }
Ejemplo n.º 3
0
        void btnExplore_Click(object sender, EventArgs e)
        {
            FrmMsg.Show("正在生成打印文档,请稍候......");
            Office2003Helper.Excel2003 excel = new Office2003Helper.Excel2003();
            excel.NewFromTemp(JERPData.ServerParameter.TempletFolder + @"GeneralShowSheet.xlt");
            excel.SetCellVal("D1", "客供物料一览表");
            TabPage page = this.tabMain.SelectedTab;

            JCommon.MyDataGridView dgrdv = (JCommon.MyDataGridView)page.Controls[0];
            excel.SetCellVal("A2", "客户:" + page.Text);
            int rowIndex = 3;
            int colIndex = 1;

            excel.ImportGridData(dgrdv, ref rowIndex, ref colIndex, true, true);
            excel.SetRangeInnerBorder(3, 1, rowIndex, colIndex);
            FrmMsg.Hide();
            excel.Show();
        }
Ejemplo n.º 4
0
        private void initDgrdv(ref JCommon.MyDataGridView dgrdv, String type)
        {
            List <JERPBiz.Base.TableDesignEntity> tableDesignEntityList = new List <JERPBiz.Base.TableDesignEntity>();

            tableDesignEntityList = tableDesignList(type);


            for (int i = 0; i < tableDesignEntityList.Count; i++)
            {
                JERPBiz.Base.TableDesignEntity tableDesignEntity = tableDesignEntityList[i];

                String table       = tableDesignEntity.FTable;        //表名
                String fieldName   = tableDesignEntity.FColField;     //字段名
                bool   visable     = tableDesignEntity.FVisable;      //是否可见
                int    index       = tableDesignEntity.FTableIndex;   //顺序
                string fieldText   = tableDesignEntity.FColFieldText; //显示列名称
                bool   isSource    = tableDesignEntity.FIsSource;     //是否有来源
                String controlType = tableDesignEntity.FControlType;  //控件类型
                String soureTable  = tableDesignEntity.FSoureTable;   //来源表
                String soureFilter = tableDesignEntity.FSoureFilter;  //过滤条件


                if (controlType.Equals("COMBOX"))
                {
                    DataGridViewComboBoxColumn colbox = getDataGridViewComboBoxColumn(tableDesignEntity);


                    dgrdv.Columns.Add(colbox);
                }
                else if
                (controlType.Equals("TEXT"))
                {
                    DataGridViewTextBoxColumn textbox = getDataGridViewTextBoxColumn(tableDesignEntity);
                    dgrdv.Columns.Add(textbox);
                }
                else
                {
                    //DataGridViewComboBoxColumn colbox = getDataGridViewComboBoxColumn(tableDesignEntity);
                    //dgrdv.Columns.Add(colbox);
                }
            }
        }
Ejemplo n.º 5
0
        private void LoadData()
        {
            //产品合计
            this.dtblPrdTotalRpt = this.accOrderItems.GetDataSaleOrderItemsMonthQtyPivotPrd(this.ctrlYearSel.Year).Tables[0];
            string  exp     = string.Empty;
            DataRow drowNew = this.dtblPrdTotalRpt.NewRow();

            drowNew["PrdCode"] = "合计";
            for (int j = 1; j < 13; j++)
            {
                exp += "+ISNULL([" + j.ToString() + "],0)";
                drowNew[j.ToString()] = this.dtblPrdTotalRpt.Compute("SUM([" + j.ToString() + "])", "");
            }
            this.dtblPrdTotalRpt.Rows.Add(drowNew);
            this.dtblPrdTotalRpt.Columns.Add("TotalQty", typeof(decimal), exp);
            DataGridViewTextBoxColumn col;

            col = new DataGridViewTextBoxColumn();
            col.DataPropertyName = "TotalQty";
            col.HeaderText       = "合计";
            col.Width            = 80;
            this.dgrdvPrdTotal.Columns.Add(col);
            this.dgrdvPrdTotal.DataSource = this.dtblPrdTotalRpt;
            this.ctrlQFind.SeachGridView  = this.dgrdvPrdTotal;
            //公司合计

            this.dtblCoReport = this.accOrderItems.GetDataSaleOrderItemsMonthQtyPivotCompany(this.ctrlYearSel.Year).Tables[0];
            exp     = string.Empty;
            drowNew = this.dtblCoReport.NewRow();
            drowNew["CompanyAbbName"] = "合计";
            for (int j = 1; j < 13; j++)
            {
                exp += "+ISNULL([" + j.ToString() + "],0)";
                drowNew[j.ToString()] = this.dtblCoReport.Compute("SUM([" + j.ToString() + "])", "");
            }
            this.dtblCoReport.Rows.Add(drowNew);
            this.dtblCoReport.Columns.Add("TotalQty", typeof(decimal), exp);

            col = new DataGridViewTextBoxColumn();
            col.DataPropertyName = "TotalQty";
            col.HeaderText       = "合计";
            col.Width            = 80;
            this.dgrdvTotal.Columns.Add(col);
            this.dgrdvTotal.DataSource = this.dtblCoReport;

            while (this.tabMain.TabCount > 2)
            {
                this.tabMain.TabPages.RemoveAt(2);
            }
            for (int irow = 0; irow < this.dtblCoReport.Rows.Count - 1; irow++)
            {
                DataRow drow           = this.dtblCoReport.Rows[irow];
                int     CompanyID      = (int)drow["CompanyID"];
                string  CompanyAbbName = drow["CompanyAbbName"].ToString();

                DataTable dtbl = this.accOrderItems.GetDataSaleOrderItemsPrdMonthQtyPivotCompany(this.ctrlYearSel.Year, CompanyID).Tables[0];
                JCommon.MyDataGridView dgrdv = new JCommon.MyDataGridView();
                dgrdv.AutoGenerateColumns = false;
                dgrdv.ReadOnly            = true;
                dgrdv.AllowUserToAddRows  = false;
                dgrdv.Dock = DockStyle.Fill;
                new JCommon.MydbgrdvStyle(dgrdv).Decorate();

                col                  = new DataGridViewTextBoxColumn();
                col.HeaderText       = "产品编号";
                col.Width            = 80;
                col.DataPropertyName = "PrdCode";
                col.Frozen           = true;
                dgrdv.Columns.Add(col);


                col                  = new DataGridViewTextBoxColumn();
                col.HeaderText       = "产品名称";
                col.Width            = 80;
                col.DataPropertyName = "PrdName";
                col.Frozen           = true;
                dgrdv.Columns.Add(col);


                col                  = new DataGridViewTextBoxColumn();
                col.HeaderText       = "产品规格";
                col.Width            = 80;
                col.DataPropertyName = "PrdSpec";
                col.Frozen           = true;
                dgrdv.Columns.Add(col);


                col                  = new DataGridViewTextBoxColumn();
                col.HeaderText       = "机型";
                col.Width            = 80;
                col.DataPropertyName = "Model";
                col.Frozen           = true;
                dgrdv.Columns.Add(col);


                drowNew            = dtbl.NewRow();
                drowNew["PrdCode"] = "合计";
                for (int j = 1; j < 13; j++)
                {
                    col                  = new DataGridViewTextBoxColumn();
                    col.HeaderText       = j.ToString() + "月";
                    col.Width            = 80;
                    col.DataPropertyName = j.ToString();
                    dgrdv.Columns.Add(col);
                    drowNew[j.ToString()] = dtbl.Compute("SUM([" + j.ToString() + "])", "");
                }
                dtbl.Rows.Add(drowNew);
                dtbl.Columns.Add("TotalQty", typeof(decimal), exp);
                col = new DataGridViewTextBoxColumn();
                col.DataPropertyName = "TotalQty";
                col.HeaderText       = "合计";
                col.Width            = 80;
                dgrdv.Columns.Add(col);

                dgrdv.DataSource = dtbl;

                TabPage page = new TabPage();
                page.Text = CompanyAbbName;
                page.Controls.Add(dgrdv);

                tabMain.TabPages.Add(page);
            }
            this.ctrlTabNav.NavTabControl = this.tabMain;
        }
Ejemplo n.º 6
0
        private void CreateTabPage()
        {
            this.tabMain.TabPages.Clear();
            this.dtblCompanys = this.accOrderItems.GetDataOEMOrderItemsNonFinishedCompany().Tables[0];
            JCommon.MyDataGridView    dgrdv;
            DataGridViewTextBoxColumn txtcol;
            TabPage page;

            foreach (DataRow drow in this.dtblCompanys.Rows)
            {
                dgrdv                       = new JCommon.MyDataGridView();
                dgrdv.Dock                  = DockStyle.Fill;
                dgrdv.ReadOnly              = true;
                dgrdv.AllowUserToAddRows    = false;
                dgrdv.AllowUserToDeleteRows = false;
                dgrdv.AutoGenerateColumns   = false;


                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "PONo";
                txtcol.HeaderText       = "订单编号";
                txtcol.Width            = 80;
                dgrdv.Columns.Add(txtcol);



                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "PrdCode";
                txtcol.HeaderText       = "物料编号";
                txtcol.Width            = 100;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "PrdName";
                txtcol.HeaderText       = "物料名称";
                txtcol.Width            = 80;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "PrdSpec";
                txtcol.HeaderText       = "物料规格";
                txtcol.Width            = 100;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "Model";
                txtcol.HeaderText       = "机型";
                txtcol.Width            = 80;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "Manufacturer";
                txtcol.HeaderText       = "品牌";
                txtcol.Width            = 66;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "Quantity";
                txtcol.HeaderText       = "P/O";
                txtcol.Width            = 66;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "FinishedQty";
                txtcol.HeaderText       = "到货";
                txtcol.Width            = 66;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "NonFinishedQty";
                txtcol.HeaderText       = "欠数";
                txtcol.Width            = 66;
                dgrdv.Columns.Add(txtcol);

                txtcol = new DataGridViewTextBoxColumn();
                txtcol.DataPropertyName = "UnitName";
                txtcol.HeaderText       = "单位";
                txtcol.Width            = 54;
                dgrdv.Columns.Add(txtcol);

                page      = new TabPage();
                page.Text = drow["CompanyAbbName"].ToString();
                page.Controls.Add(dgrdv);
                page.Tag = (int)drow["CompanyID"];
                this.tabMain.TabPages.Add(page);
            }
        }
Ejemplo n.º 7
0
 void tabMain_SelectedIndexChanged(object sender, EventArgs e)
 {
     JCommon.MyDataGridView dgrdv = (JCommon.MyDataGridView) this.tabMain.SelectedTab.Controls[0];
     this.ctrlQFind.SeachGridView = dgrdv;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
     this.panel1 = new System.Windows.Forms.Panel();
     this.ctrlYear = new JCommon.CtrlYear();
     this.label2 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.panel2 = new System.Windows.Forms.Panel();
     this.ctrlSpot = new JCommon.CtrlGridNextSpot();
     this.btnExplore = new System.Windows.Forms.Button();
     this.ctrlQFind = new JCommon.CtrlGridQuickFind();
     this.dgrdvCustomerAMT = new JCommon.MyDataGridView();
     this.tabMain = new System.Windows.Forms.TabControl();
     this.pagePrdQty = new System.Windows.Forms.TabPage();
     this.dgrdvPrdQty = new JCommon.MyDataGridView();
     this.ColumnPrdCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnPrdName = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnPrdSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnModel = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.pagePrdAMT = new System.Windows.Forms.TabPage();
     this.dgrdvPrdAMT = new JCommon.MyDataGridView();
     this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.pageCustomerAMT = new System.Windows.Forms.TabPage();
     this.ColumnCompanyAbbName = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnMoneyTypeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.panel1.SuspendLayout();
     this.panel2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvCustomerAMT)).BeginInit();
     this.tabMain.SuspendLayout();
     this.pagePrdQty.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvPrdQty)).BeginInit();
     this.pagePrdAMT.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvPrdAMT)).BeginInit();
     this.pageCustomerAMT.SuspendLayout();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Controls.Add(this.ctrlYear);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(1045, 38);
     this.panel1.TabIndex = 1;
     //
     // ctrlYear
     //
     this.ctrlYear.AutoSize = true;
     this.ctrlYear.Location = new System.Drawing.Point(41, 15);
     this.ctrlYear.Name = "ctrlYear";
     this.ctrlYear.Size = new System.Drawing.Size(79, 21);
     this.ctrlYear.TabIndex = 4;
     this.ctrlYear.Year = 2011;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(4, 20);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(29, 12);
     this.label2.TabIndex = 3;
     this.label2.Text = "年份";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label1.Location = new System.Drawing.Point(484, 9);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(82, 14);
     this.label1.TabIndex = 2;
     this.label1.Text = "月销售报表";
     //
     // panel2
     //
     this.panel2.Controls.Add(this.ctrlSpot);
     this.panel2.Controls.Add(this.btnExplore);
     this.panel2.Controls.Add(this.ctrlQFind);
     this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.panel2.Location = new System.Drawing.Point(0, 506);
     this.panel2.Name = "panel2";
     this.panel2.Size = new System.Drawing.Size(1045, 29);
     this.panel2.TabIndex = 2;
     //
     // ctrlSpot
     //
     this.ctrlSpot.Location = new System.Drawing.Point(253, 5);
     this.ctrlSpot.Name = "ctrlSpot";
     this.ctrlSpot.SeachGridView = null;
     this.ctrlSpot.Size = new System.Drawing.Size(98, 21);
     this.ctrlSpot.TabIndex = 5;
     //
     // btnExplore
     //
     this.btnExplore.Location = new System.Drawing.Point(386, 3);
     this.btnExplore.Name = "btnExplore";
     this.btnExplore.Size = new System.Drawing.Size(77, 25);
     this.btnExplore.TabIndex = 4;
     this.btnExplore.Text = "输出打印";
     this.btnExplore.UseVisualStyleBackColor = true;
     //
     // ctrlQFind
     //
     this.ctrlQFind.Location = new System.Drawing.Point(3, 5);
     this.ctrlQFind.Name = "ctrlQFind";
     this.ctrlQFind.SeachGridView = null;
     this.ctrlQFind.Size = new System.Drawing.Size(244, 21);
     this.ctrlQFind.TabIndex = 0;
     //
     // dgrdvCustomerAMT
     //
     this.dgrdvCustomerAMT.AllowUserToAddRows = false;
     this.dgrdvCustomerAMT.AllowUserToDeleteRows = false;
     this.dgrdvCustomerAMT.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgrdvCustomerAMT.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ColumnCompanyAbbName,
     this.ColumnMoneyTypeName});
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgrdvCustomerAMT.DefaultCellStyle = dataGridViewCellStyle1;
     this.dgrdvCustomerAMT.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgrdvCustomerAMT.Location = new System.Drawing.Point(3, 3);
     this.dgrdvCustomerAMT.Name = "dgrdvCustomerAMT";
     this.dgrdvCustomerAMT.ReadOnly = true;
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgrdvCustomerAMT.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
     dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White;
     this.dgrdvCustomerAMT.RowsDefaultCellStyle = dataGridViewCellStyle3;
     this.dgrdvCustomerAMT.RowTemplate.Height = 23;
     this.dgrdvCustomerAMT.Size = new System.Drawing.Size(1031, 436);
     this.dgrdvCustomerAMT.TabIndex = 4;
     //
     // tabMain
     //
     this.tabMain.Controls.Add(this.pagePrdQty);
     this.tabMain.Controls.Add(this.pagePrdAMT);
     this.tabMain.Controls.Add(this.pageCustomerAMT);
     this.tabMain.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabMain.Location = new System.Drawing.Point(0, 38);
     this.tabMain.Name = "tabMain";
     this.tabMain.SelectedIndex = 0;
     this.tabMain.Size = new System.Drawing.Size(1045, 468);
     this.tabMain.TabIndex = 5;
     //
     // pagePrdQty
     //
     this.pagePrdQty.Controls.Add(this.dgrdvPrdQty);
     this.pagePrdQty.Location = new System.Drawing.Point(4, 22);
     this.pagePrdQty.Name = "pagePrdQty";
     this.pagePrdQty.Padding = new System.Windows.Forms.Padding(3);
     this.pagePrdQty.Size = new System.Drawing.Size(1037, 442);
     this.pagePrdQty.TabIndex = 1;
     this.pagePrdQty.Text = "产品数量";
     this.pagePrdQty.UseVisualStyleBackColor = true;
     //
     // dgrdvPrdQty
     //
     this.dgrdvPrdQty.AllowUserToAddRows = false;
     this.dgrdvPrdQty.AllowUserToDeleteRows = false;
     this.dgrdvPrdQty.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgrdvPrdQty.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ColumnPrdCode,
     this.ColumnPrdName,
     this.ColumnPrdSpec,
     this.ColumnModel});
     dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgrdvPrdQty.DefaultCellStyle = dataGridViewCellStyle4;
     this.dgrdvPrdQty.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgrdvPrdQty.Location = new System.Drawing.Point(3, 3);
     this.dgrdvPrdQty.Name = "dgrdvPrdQty";
     this.dgrdvPrdQty.ReadOnly = true;
     dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgrdvPrdQty.RowHeadersDefaultCellStyle = dataGridViewCellStyle5;
     dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.White;
     this.dgrdvPrdQty.RowsDefaultCellStyle = dataGridViewCellStyle6;
     this.dgrdvPrdQty.RowTemplate.Height = 23;
     this.dgrdvPrdQty.Size = new System.Drawing.Size(1031, 436);
     this.dgrdvPrdQty.TabIndex = 5;
     //
     // ColumnPrdCode
     //
     this.ColumnPrdCode.DataPropertyName = "PrdCode";
     this.ColumnPrdCode.Frozen = true;
     this.ColumnPrdCode.HeaderText = "产品编号";
     this.ColumnPrdCode.Name = "ColumnPrdCode";
     this.ColumnPrdCode.ReadOnly = true;
     this.ColumnPrdCode.Width = 80;
     //
     // ColumnPrdName
     //
     this.ColumnPrdName.DataPropertyName = "PrdName";
     this.ColumnPrdName.HeaderText = "产品名称";
     this.ColumnPrdName.Name = "ColumnPrdName";
     this.ColumnPrdName.ReadOnly = true;
     //
     // ColumnPrdSpec
     //
     this.ColumnPrdSpec.DataPropertyName = "PrdSpec";
     this.ColumnPrdSpec.HeaderText = "产品规格";
     this.ColumnPrdSpec.Name = "ColumnPrdSpec";
     this.ColumnPrdSpec.ReadOnly = true;
     //
     // ColumnModel
     //
     this.ColumnModel.DataPropertyName = "Model";
     this.ColumnModel.HeaderText = "机型";
     this.ColumnModel.Name = "ColumnModel";
     this.ColumnModel.ReadOnly = true;
     this.ColumnModel.Width = 80;
     //
     // pagePrdAMT
     //
     this.pagePrdAMT.Controls.Add(this.dgrdvPrdAMT);
     this.pagePrdAMT.Location = new System.Drawing.Point(4, 22);
     this.pagePrdAMT.Name = "pagePrdAMT";
     this.pagePrdAMT.Padding = new System.Windows.Forms.Padding(3);
     this.pagePrdAMT.Size = new System.Drawing.Size(1037, 442);
     this.pagePrdAMT.TabIndex = 2;
     this.pagePrdAMT.Text = "产品金额";
     this.pagePrdAMT.UseVisualStyleBackColor = true;
     //
     // dgrdvPrdAMT
     //
     this.dgrdvPrdAMT.AllowUserToAddRows = false;
     this.dgrdvPrdAMT.AllowUserToDeleteRows = false;
     this.dgrdvPrdAMT.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgrdvPrdAMT.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.dataGridViewTextBoxColumn1,
     this.dataGridViewTextBoxColumn2,
     this.dataGridViewTextBoxColumn3,
     this.dataGridViewTextBoxColumn4});
     dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgrdvPrdAMT.DefaultCellStyle = dataGridViewCellStyle7;
     this.dgrdvPrdAMT.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgrdvPrdAMT.Location = new System.Drawing.Point(3, 3);
     this.dgrdvPrdAMT.Name = "dgrdvPrdAMT";
     this.dgrdvPrdAMT.ReadOnly = true;
     dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgrdvPrdAMT.RowHeadersDefaultCellStyle = dataGridViewCellStyle8;
     dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White;
     this.dgrdvPrdAMT.RowsDefaultCellStyle = dataGridViewCellStyle9;
     this.dgrdvPrdAMT.RowTemplate.Height = 23;
     this.dgrdvPrdAMT.Size = new System.Drawing.Size(1031, 436);
     this.dgrdvPrdAMT.TabIndex = 6;
     //
     // dataGridViewTextBoxColumn1
     //
     this.dataGridViewTextBoxColumn1.DataPropertyName = "PrdCode";
     this.dataGridViewTextBoxColumn1.Frozen = true;
     this.dataGridViewTextBoxColumn1.HeaderText = "产品编号";
     this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
     this.dataGridViewTextBoxColumn1.ReadOnly = true;
     this.dataGridViewTextBoxColumn1.Width = 80;
     //
     // dataGridViewTextBoxColumn2
     //
     this.dataGridViewTextBoxColumn2.DataPropertyName = "PrdName";
     this.dataGridViewTextBoxColumn2.HeaderText = "产品名称";
     this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
     this.dataGridViewTextBoxColumn2.ReadOnly = true;
     //
     // dataGridViewTextBoxColumn3
     //
     this.dataGridViewTextBoxColumn3.DataPropertyName = "PrdSpec";
     this.dataGridViewTextBoxColumn3.HeaderText = "产品规格";
     this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
     this.dataGridViewTextBoxColumn3.ReadOnly = true;
     //
     // dataGridViewTextBoxColumn4
     //
     this.dataGridViewTextBoxColumn4.DataPropertyName = "Model";
     this.dataGridViewTextBoxColumn4.HeaderText = "机型";
     this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
     this.dataGridViewTextBoxColumn4.ReadOnly = true;
     this.dataGridViewTextBoxColumn4.Width = 80;
     //
     // pageCustomerAMT
     //
     this.pageCustomerAMT.Controls.Add(this.dgrdvCustomerAMT);
     this.pageCustomerAMT.Location = new System.Drawing.Point(4, 22);
     this.pageCustomerAMT.Name = "pageCustomerAMT";
     this.pageCustomerAMT.Padding = new System.Windows.Forms.Padding(3);
     this.pageCustomerAMT.Size = new System.Drawing.Size(1037, 442);
     this.pageCustomerAMT.TabIndex = 0;
     this.pageCustomerAMT.Text = "客户金额";
     this.pageCustomerAMT.UseVisualStyleBackColor = true;
     //
     // ColumnCompanyAbbName
     //
     this.ColumnCompanyAbbName.DataPropertyName = "CompanyAbbName";
     this.ColumnCompanyAbbName.Frozen = true;
     this.ColumnCompanyAbbName.HeaderText = "客户";
     this.ColumnCompanyAbbName.Name = "ColumnCompanyAbbName";
     this.ColumnCompanyAbbName.ReadOnly = true;
     this.ColumnCompanyAbbName.Width = 80;
     //
     // ColumnMoneyTypeName
     //
     this.ColumnMoneyTypeName.DataPropertyName = "MoneyTypeName";
     this.ColumnMoneyTypeName.Frozen = true;
     this.ColumnMoneyTypeName.HeaderText = "币种";
     this.ColumnMoneyTypeName.Name = "ColumnMoneyTypeName";
     this.ColumnMoneyTypeName.ReadOnly = true;
     this.ColumnMoneyTypeName.Width = 66;
     //
     // FrmDeliverMonthRpt
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1045, 535);
     this.Controls.Add(this.tabMain);
     this.Controls.Add(this.panel2);
     this.Controls.Add(this.panel1);
     this.Name = "FrmDeliverMonthRpt";
     this.Text = "FrmSaleMonthAMTRpt";
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     this.panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvCustomerAMT)).EndInit();
     this.tabMain.ResumeLayout(false);
     this.pagePrdQty.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvPrdQty)).EndInit();
     this.pagePrdAMT.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dgrdvPrdAMT)).EndInit();
     this.pageCustomerAMT.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     this.panel1 = new System.Windows.Forms.Panel();
     this.lnkNew = new System.Windows.Forms.LinkLabel();
     this.label1 = new System.Windows.Forms.Label();
     this.cMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.mItemRefresh = new System.Windows.Forms.ToolStripMenuItem();
     this.dgrdv = new JCommon.MyDataGridView();
     this.ColumnbtnEdit = new System.Windows.Forms.DataGridViewButtonColumn();
     this.ColumnYear = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnMonth = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnDateBegin = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnDateEnd = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnMakerPsn = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.panel1.SuspendLayout();
     this.cMenu.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdv)).BeginInit();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Controls.Add(this.lnkNew);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(658, 38);
     this.panel1.TabIndex = 1;
     //
     // lnkNew
     //
     this.lnkNew.AutoSize = true;
     this.lnkNew.Location = new System.Drawing.Point(3, 23);
     this.lnkNew.Name = "lnkNew";
     this.lnkNew.Size = new System.Drawing.Size(53, 12);
     this.lnkNew.TabIndex = 1;
     this.lnkNew.TabStop = true;
     this.lnkNew.Text = "新增单据";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label1.Location = new System.Drawing.Point(300, 9);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(82, 14);
     this.label1.TabIndex = 0;
     this.label1.Text = "工资单管理";
     //
     // cMenu
     //
     this.cMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.mItemRefresh});
     this.cMenu.Name = "cMenu";
     this.cMenu.Size = new System.Drawing.Size(99, 26);
     //
     // mItemRefresh
     //
     this.mItemRefresh.Name = "mItemRefresh";
     this.mItemRefresh.Size = new System.Drawing.Size(98, 22);
     this.mItemRefresh.Text = "刷新";
     //
     // dgrdv
     //
     this.dgrdv.AllowUserToAddRows = false;
     this.dgrdv.AllowUserToDeleteRows = false;
     this.dgrdv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgrdv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ColumnbtnEdit,
     this.ColumnYear,
     this.ColumnMonth,
     this.ColumnDateBegin,
     this.ColumnDateEnd,
     this.ColumnMakerPsn});
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgrdv.DefaultCellStyle = dataGridViewCellStyle1;
     this.dgrdv.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgrdv.Location = new System.Drawing.Point(0, 38);
     this.dgrdv.Name = "dgrdv";
     this.dgrdv.ReadOnly = true;
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgrdv.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
     dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White;
     this.dgrdv.RowsDefaultCellStyle = dataGridViewCellStyle3;
     this.dgrdv.RowTemplate.Height = 23;
     this.dgrdv.Size = new System.Drawing.Size(658, 473);
     this.dgrdv.TabIndex = 9;
     //
     // ColumnbtnEdit
     //
     this.ColumnbtnEdit.HeaderText = "变更";
     this.ColumnbtnEdit.Name = "ColumnbtnEdit";
     this.ColumnbtnEdit.ReadOnly = true;
     this.ColumnbtnEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnbtnEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.ColumnbtnEdit.Text = "变更";
     this.ColumnbtnEdit.UseColumnTextForButtonValue = true;
     this.ColumnbtnEdit.Width = 60;
     //
     // ColumnYear
     //
     this.ColumnYear.DataPropertyName = "Year";
     this.ColumnYear.HeaderText = "年";
     this.ColumnYear.Name = "ColumnYear";
     this.ColumnYear.ReadOnly = true;
     this.ColumnYear.Width = 66;
     //
     // ColumnMonth
     //
     this.ColumnMonth.DataPropertyName = "Month";
     this.ColumnMonth.HeaderText = "月";
     this.ColumnMonth.Name = "ColumnMonth";
     this.ColumnMonth.ReadOnly = true;
     this.ColumnMonth.Width = 54;
     //
     // ColumnDateBegin
     //
     this.ColumnDateBegin.DataPropertyName = "DateBegin";
     this.ColumnDateBegin.HeaderText = "起止日期";
     this.ColumnDateBegin.Name = "ColumnDateBegin";
     this.ColumnDateBegin.ReadOnly = true;
     this.ColumnDateBegin.Width = 80;
     //
     // ColumnDateEnd
     //
     this.ColumnDateEnd.DataPropertyName = "DateEnd";
     this.ColumnDateEnd.HeaderText = "截止日期";
     this.ColumnDateEnd.Name = "ColumnDateEnd";
     this.ColumnDateEnd.ReadOnly = true;
     //
     // ColumnMakerPsn
     //
     this.ColumnMakerPsn.DataPropertyName = "MakerPsn";
     this.ColumnMakerPsn.HeaderText = "制单";
     this.ColumnMakerPsn.Name = "ColumnMakerPsn";
     this.ColumnMakerPsn.ReadOnly = true;
     this.ColumnMakerPsn.Width = 78;
     //
     // FrmWageNote
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(658, 511);
     this.Controls.Add(this.dgrdv);
     this.Controls.Add(this.panel1);
     this.Name = "FrmWageNote";
     this.Text = "FrmWageNote";
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     this.cMenu.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.dgrdv)).EndInit();
     this.ResumeLayout(false);
 }
Ejemplo n.º 10
0
        //设置窗体中各控件之样式
        public void  SetControlStyle(Control ctrl)
        {
            Application.DoEvents();
            if (ctrl.Controls.Count == 0)
            {
                if (JERPBiz.Config.ConfigInfo.GetStyleFontKeyFlag())
                {
                    Font fnt = ctrl.Font;
                    if (fnt.Name.ToLower() != "webdings")
                    {
                        ctrl.Font = new Font(JERPBiz.Config.ConfigInfo.GetStyleFont(), fnt.SizeInPoints, fnt.Style);
                    }
                }
            }
            if (ctrl.GetType().Equals(typeof(Button)))
            {
                Button btn = (Button)ctrl;
                SetButtonStyle(btn);
            }
            if (ctrl.GetType().Equals(typeof(JCommon.MyDataGridView)))
            {
                JCommon.MyDataGridView grid = (JCommon.MyDataGridView)ctrl;
                new JCommon.MydbgrdvStyle(grid).Decorate();
                if (JERPBiz.Config.ConfigInfo.GetStyleFontKeyFlag())
                {
                    grid.Font = new System.Drawing.Font(JERPBiz.Config.ConfigInfo.GetStyleFont(), 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel, ((byte)(134)));
                }
            }
            if (ctrl.GetType().Equals(typeof(TextBox)))
            {
                TextBox txt = (TextBox)ctrl;
                new JCommon.MyTextBoxStyle(txt).Decorate();
            }
            if (ctrl.GetType().Equals(typeof(RichTextBox)))
            {
                new JCommon.MyRichTextBoxStyle((RichTextBox)ctrl).Decorate();
            }
            if (ctrl.GetType().Equals(typeof(ComboBox)))
            {
                ComboBox cmb = (ComboBox)ctrl;
                cmb.FlatStyle          = FlatStyle.System;
                cmb.BackColor          = Color.White;
                cmb.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                cmb.AutoCompleteSource = AutoCompleteSource.ListItems;
                cmb.MaxDropDownItems   = 32;
                int width_ = 0;
                System.Drawing.Graphics g = cmb.CreateGraphics();
                for (int i = 0; i < cmb.Items.Count; i++)
                {
                    SizeF size = g.MeasureString(cmb.GetItemText(cmb.Items[i]), cmb.Font);
                    int   lng  = (int)size.Width;
                    if (lng > width_)
                    {
                        width_ = lng;
                    }
                }
                cmb.DropDownWidth = width_ + 20;
                //if (cmb.ValueMember !=string.Empty )
                //{
                //    cmb.KeyPress += new KeyPressEventHandler(cmb_KeyPress);
                //}
            }
            if (ctrl.GetType().Equals(typeof(Label)))
            {
                if (ctrl.Parent == this.frm.GetChildAtPoint(new Point(0, 0)))
                {
                    ctrl.BackColor = Color.Transparent;
                }
            }
            if (ctrl.GetType().Equals(typeof(TabPage)))
            {
                TabPage tpg = (TabPage)ctrl;
                this.SetTabPageStyle(tpg);
            }

            if (ctrl.GetType().Equals(typeof(GroupBox)))
            {
                ctrl.BackColor = frm.BackColor;
            }
            foreach (Control ctrl_ in ctrl.Controls)
            {
                SetControlStyle(ctrl_);
            }
        }
Ejemplo n.º 11
0
 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     this.panel1 = new System.Windows.Forms.Panel();
     this.ctrlQCPsnID = new JERPApp.Define.Hr.CtrlPersonnel();
     this.label5 = new System.Windows.Forms.Label();
     this.ctrlCompanyID = new JERPApp.Define.General.CtrlCustomer();
     this.dtpDateNote = new System.Windows.Forms.DateTimePicker();
     this.label4 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.txtNoteCode = new System.Windows.Forms.TextBox();
     this.label2 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.panel2 = new System.Windows.Forms.Panel();
     this.btnAddPrd = new System.Windows.Forms.Button();
     this.btnNew = new System.Windows.Forms.Button();
     this.btnSave = new System.Windows.Forms.Button();
     this.rchMemo = new System.Windows.Forms.RichTextBox();
     this.label8 = new System.Windows.Forms.Label();
     this.dgrdv = new JCommon.MyDataGridView();
     this.ColumnPrdCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnPrdName = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnPrdSpec = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnModel = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnManufacturer = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnAssistantCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnQuantity = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnUnitName = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ColumnPrdID = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.panel1.SuspendLayout();
     this.panel2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdv)).BeginInit();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Controls.Add(this.ctrlQCPsnID);
     this.panel1.Controls.Add(this.label5);
     this.panel1.Controls.Add(this.ctrlCompanyID);
     this.panel1.Controls.Add(this.dtpDateNote);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.txtNoteCode);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Controls.Add(this.label1);
     this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(769, 67);
     this.panel1.TabIndex = 2;
     //
     // ctrlQCPsnID
     //
     this.ctrlQCPsnID.AutoSize = true;
     this.ctrlQCPsnID.Location = new System.Drawing.Point(227, 41);
     this.ctrlQCPsnID.Name = "ctrlQCPsnID";
     this.ctrlQCPsnID.PsnID = -1;
     this.ctrlQCPsnID.Size = new System.Drawing.Size(109, 23);
     this.ctrlQCPsnID.TabIndex = 145;
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(180, 47);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(41, 12);
     this.label5.TabIndex = 144;
     this.label5.Text = "签收人";
     //
     // ctrlCompanyID
     //
     this.ctrlCompanyID.CompanyID = 1;
     this.ctrlCompanyID.Location = new System.Drawing.Point(61, 41);
     this.ctrlCompanyID.Name = "ctrlCompanyID";
     this.ctrlCompanyID.Size = new System.Drawing.Size(115, 23);
     this.ctrlCompanyID.TabIndex = 116;
     //
     // dtpDateNote
     //
     this.dtpDateNote.Location = new System.Drawing.Point(414, 38);
     this.dtpDateNote.Name = "dtpDateNote";
     this.dtpDateNote.Size = new System.Drawing.Size(113, 21);
     this.dtpDateNote.TabIndex = 6;
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(350, 44);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(53, 12);
     this.label4.TabIndex = 5;
     this.label4.Text = "制单日期";
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(9, 49);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(29, 12);
     this.label3.TabIndex = 3;
     this.label3.Text = "客户";
     //
     // txtNoteCode
     //
     this.txtNoteCode.Location = new System.Drawing.Point(61, 7);
     this.txtNoteCode.Name = "txtNoteCode";
     this.txtNoteCode.Size = new System.Drawing.Size(115, 21);
     this.txtNoteCode.TabIndex = 2;
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(9, 16);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(53, 12);
     this.label2.TabIndex = 1;
     this.label2.Text = "送货单号";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     this.label1.Location = new System.Drawing.Point(329, 9);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(142, 14);
     this.label1.TabIndex = 0;
     this.label1.Text = "无订单原料客供收货";
     //
     // panel2
     //
     this.panel2.Controls.Add(this.btnAddPrd);
     this.panel2.Controls.Add(this.btnNew);
     this.panel2.Controls.Add(this.btnSave);
     this.panel2.Controls.Add(this.rchMemo);
     this.panel2.Controls.Add(this.label8);
     this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.panel2.Location = new System.Drawing.Point(0, 467);
     this.panel2.Name = "panel2";
     this.panel2.Size = new System.Drawing.Size(769, 34);
     this.panel2.TabIndex = 3;
     //
     // btnAddPrd
     //
     this.btnAddPrd.Location = new System.Drawing.Point(429, 6);
     this.btnAddPrd.Name = "btnAddPrd";
     this.btnAddPrd.Size = new System.Drawing.Size(75, 23);
     this.btnAddPrd.TabIndex = 15;
     this.btnAddPrd.Text = "+物料";
     this.btnAddPrd.UseVisualStyleBackColor = true;
     //
     // btnNew
     //
     this.btnNew.Location = new System.Drawing.Point(622, 6);
     this.btnNew.Name = "btnNew";
     this.btnNew.Size = new System.Drawing.Size(75, 23);
     this.btnNew.TabIndex = 3;
     this.btnNew.Text = "新增";
     this.btnNew.UseVisualStyleBackColor = true;
     //
     // btnSave
     //
     this.btnSave.Location = new System.Drawing.Point(521, 6);
     this.btnSave.Name = "btnSave";
     this.btnSave.Size = new System.Drawing.Size(95, 23);
     this.btnSave.TabIndex = 2;
     this.btnSave.Text = "保存入账";
     this.btnSave.UseVisualStyleBackColor = true;
     //
     // rchMemo
     //
     this.rchMemo.Location = new System.Drawing.Point(43, 6);
     this.rchMemo.Name = "rchMemo";
     this.rchMemo.Size = new System.Drawing.Size(357, 24);
     this.rchMemo.TabIndex = 1;
     this.rchMemo.Text = "";
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(8, 18);
     this.label8.Name = "label8";
     this.label8.Size = new System.Drawing.Size(29, 12);
     this.label8.TabIndex = 0;
     this.label8.Text = "备注";
     this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // dgrdv
     //
     this.dgrdv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ColumnPrdCode,
     this.ColumnPrdName,
     this.ColumnPrdSpec,
     this.ColumnModel,
     this.ColumnManufacturer,
     this.ColumnAssistantCode,
     this.ColumnQuantity,
     this.ColumnUnitName,
     this.ColumnPrdID});
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgrdv.DefaultCellStyle = dataGridViewCellStyle1;
     this.dgrdv.Dock = System.Windows.Forms.DockStyle.Fill;
     this.dgrdv.Location = new System.Drawing.Point(0, 67);
     this.dgrdv.Name = "dgrdv";
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgrdv.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
     dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.Red;
     dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White;
     this.dgrdv.RowsDefaultCellStyle = dataGridViewCellStyle3;
     this.dgrdv.RowTemplate.Height = 23;
     this.dgrdv.Size = new System.Drawing.Size(769, 400);
     this.dgrdv.TabIndex = 4;
     //
     // ColumnPrdCode
     //
     this.ColumnPrdCode.DataPropertyName = "PrdCode";
     this.ColumnPrdCode.HeaderText = "物料编号";
     this.ColumnPrdCode.Name = "ColumnPrdCode";
     this.ColumnPrdCode.ReadOnly = true;
     this.ColumnPrdCode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnPrdCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     //
     // ColumnPrdName
     //
     this.ColumnPrdName.DataPropertyName = "PrdName";
     this.ColumnPrdName.HeaderText = "物料名称";
     this.ColumnPrdName.Name = "ColumnPrdName";
     this.ColumnPrdName.ReadOnly = true;
     this.ColumnPrdName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnPrdName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     //
     // ColumnPrdSpec
     //
     this.ColumnPrdSpec.DataPropertyName = "PrdSpec";
     this.ColumnPrdSpec.HeaderText = "物料规格";
     this.ColumnPrdSpec.Name = "ColumnPrdSpec";
     this.ColumnPrdSpec.ReadOnly = true;
     this.ColumnPrdSpec.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnPrdSpec.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     this.ColumnPrdSpec.Width = 120;
     //
     // ColumnModel
     //
     this.ColumnModel.DataPropertyName = "Model";
     this.ColumnModel.HeaderText = "机型";
     this.ColumnModel.Name = "ColumnModel";
     this.ColumnModel.ReadOnly = true;
     this.ColumnModel.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnModel.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     this.ColumnModel.Width = 80;
     //
     // ColumnManufacturer
     //
     this.ColumnManufacturer.DataPropertyName = "Manufacturer";
     this.ColumnManufacturer.HeaderText = "品牌";
     this.ColumnManufacturer.Name = "ColumnManufacturer";
     this.ColumnManufacturer.ReadOnly = true;
     this.ColumnManufacturer.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnManufacturer.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     this.ColumnManufacturer.Width = 66;
     //
     // ColumnAssistantCode
     //
     this.ColumnAssistantCode.HeaderText = "助记码";
     this.ColumnAssistantCode.Name = "ColumnAssistantCode";
     this.ColumnAssistantCode.Width = 66;
     //
     // ColumnQuantity
     //
     this.ColumnQuantity.DataPropertyName = "Quantity";
     this.ColumnQuantity.HeaderText = "数量";
     this.ColumnQuantity.Name = "ColumnQuantity";
     this.ColumnQuantity.Width = 60;
     //
     // ColumnUnitName
     //
     this.ColumnUnitName.DataPropertyName = "UnitName";
     this.ColumnUnitName.HeaderText = "单位";
     this.ColumnUnitName.Name = "ColumnUnitName";
     this.ColumnUnitName.ReadOnly = true;
     this.ColumnUnitName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ColumnUnitName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
     this.ColumnUnitName.Width = 54;
     //
     // ColumnPrdID
     //
     this.ColumnPrdID.DataPropertyName = "PrdID";
     this.ColumnPrdID.HeaderText = "PrdID";
     this.ColumnPrdID.Name = "ColumnPrdID";
     this.ColumnPrdID.Visible = false;
     //
     // FrmReceiveNoteNonOrderOper
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(769, 501);
     this.Controls.Add(this.dgrdv);
     this.Controls.Add(this.panel2);
     this.Controls.Add(this.panel1);
     this.Name = "FrmReceiveNoteNonOrderOper";
     this.Text = "无订单原料客供收货";
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     this.panel2.ResumeLayout(false);
     this.panel2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgrdv)).EndInit();
     this.ResumeLayout(false);
 }