Exemple #1
0
        /// <summary>
        /// 设置底部DataGridView的Anchor属性
        /// </summary>
        private void SetDgvAnchor()
        {
            #region 其他收费项目
            dgvOther.Dock     = DockStyle.Fill;
            dgvOther.ReadOnly = false;
            dgvOther.Rows.Add(3);
            dgvOther.AllowUserToAddRows = true;
            ControlsConfig.NumberLimitdgv(dgvproject, new List <string>()
            {
                "other_expense_amount"
            });
            DataTable dot = CommonCtrl.GetDictByCode("sys_other_expense_type", true);
            other_expense_type.DataSource    = dot;
            other_expense_type.ValueMember   = "dic_id";
            other_expense_type.DisplayMember = "dic_name";
            #endregion

            #region 维修项目信息设置
            dgvproject.Dock     = DockStyle.Fill;
            dgvproject.ReadOnly = false;
            dgvproject.Rows.Add(3);
            dgvproject.AllowUserToAddRows = true;
            dgvproject.Columns["project_num"].ReadOnly  = true;
            dgvproject.Columns["project_name"].ReadOnly = true;
            dgvproject.Columns["repair_type"].ReadOnly  = true;
            dgvproject.Columns["whours_type"].ReadOnly  = true;
            dgvproject.Columns["tax_amount"].ReadOnly   = true;
            ControlsConfig.NumberLimitdgv(dgvproject, new List <string>()
            {
                "whours_counts", "whours_price",
            });
            #endregion

            #region 维修用料设置
            dgvMaterials.Dock     = DockStyle.Fill;
            dgvMaterials.ReadOnly = false;
            dgvMaterials.Rows.Add(3);
            dgvMaterials.AllowUserToAddRows                 = true;
            dgvMaterials.Columns["parts_code"].ReadOnly     = true;
            dgvMaterials.Columns["parts_name"].ReadOnly     = true;
            dgvMaterials.Columns["unit"].ReadOnly           = true;
            dgvMaterials.Columns["original_price"].ReadOnly = true;
            ControlsConfig.NumberLimitdgv(dgvMaterials, new List <string>()
            {
                "number", "preferential_price"
            });
            #endregion
        }
Exemple #2
0
        /// <summary>
        /// 设置底部DataGridView的Anchor属性
        /// </summary>
        private void SetDgvAnchor()
        {
            #region 维修项目信息设置
            dgvproject.Dock = DockStyle.Fill;
            //dgvproject.Columns["colCheck"].HeaderText = "选择";
            dgvproject.ReadOnly = false;
            dgvproject.Rows.Add(3);
            dgvproject.AllowUserToAddRows            = true;
            dgvproject.Columns["item_no"].ReadOnly   = true;
            dgvproject.Columns["item_type"].ReadOnly = true;
            dgvproject.Columns["item_name"].ReadOnly = true;
            dgvproject.Columns["man_hour_norm_unitprice"].ReadOnly = true;
            dgvproject.Columns["sum_money"].ReadOnly     = true;
            dgvproject.Columns["man_hour_type"].ReadOnly = true;
            ControlsConfig.NumberLimitdgv(dgvproject, new List <string>()
            {
                "man_hour_quantity"
            });

            #endregion

            #region 维修用料设置
            dgvMaterials.Dock = DockStyle.Fill;
            //dgvMaterials.Columns["MCheck"].HeaderText = "选择";
            dgvMaterials.ReadOnly = false;
            dgvMaterials.Rows.Add(3);
            dgvMaterials.AllowUserToAddRows                   = true;
            dgvMaterials.Columns["parts_code"].ReadOnly       = true;
            dgvMaterials.Columns["parts_name"].ReadOnly       = true;
            dgvMaterials.Columns["norms"].ReadOnly            = true;
            dgvMaterials.Columns["unit"].ReadOnly             = true;
            dgvMaterials.Columns["whether_imported"].ReadOnly = true;
            dgvMaterials.Columns["Msum_money"].ReadOnly       = true;
            dgvMaterials.Columns["drawn_no"].ReadOnly         = true;
            dgvMaterials.Columns["vehicle_model"].ReadOnly    = true;
            ControlsConfig.NumberLimitdgv(dgvMaterials, new List <string>()
            {
                "quantity", "unit_price"
            });
            #endregion
        }
Exemple #3
0
 /// <summary>
 /// 设置底部DataGridView的Anchor属性
 /// </summary>
 private void SetDgvAnchor()
 {
     #region 维修用料设置
     dgvMaterials.Dock = DockStyle.Fill;
     //dgvMaterials.Columns["MCheck"].HeaderText = "选择";
     dgvMaterials.ReadOnly = false;
     dgvMaterials.Rows.Add(3);
     dgvMaterials.AllowUserToAddRows                   = true;
     dgvMaterials.Columns["parts_code"].ReadOnly       = true;
     dgvMaterials.Columns["parts_name"].ReadOnly       = true;
     dgvMaterials.Columns["unit"].ReadOnly             = true;
     dgvMaterials.Columns["whether_imported"].ReadOnly = true;
     dgvMaterials.Columns["drawn_no"].ReadOnly         = true;
     dgvMaterials.Columns["vehicle_brand"].ReadOnly    = true;
     dgvMaterials.Columns["inventory_num"].ReadOnly    = true;
     dgvMaterials.Columns["picking_num"].ReadOnly      = true;
     dgvMaterials.Columns["received_num"].ReadOnly     = true;
     dgvMaterials.Columns["notFetchNum"].ReadOnly      = true;
     ControlsConfig.NumberLimitdgv(dgvMaterials, new List <string>()
     {
         "quantity"
     });
     #endregion
 }