RenderDataGridViewBackColor() public static method

public static RenderDataGridViewBackColor ( System.Windows.Forms.DataGridView dataGrid ) : System.Windows.Forms.DataGridView
dataGrid System.Windows.Forms.DataGridView
return System.Windows.Forms.DataGridView
Exemplo n.º 1
0
 protected virtual void gvListDataBind()
 {
     this.gvHuList.Visible = false;
     this.gvList.Visible   = true;
     if (this.resolver.Transformers == null)
     {
         this.resolver.Transformers = new Transformer[] { };
     }
     this.gvList.DataSource = new BindingList <Transformer>(this.resolver.Transformers);
     if (this.resolver != null && !(this.resolver.IsScanHu || this.gvHuList.Rows.Count > 0))
     {
         this.gvList.Columns["Cartons"].Visible = false;
         if (this.gvList.CurrentCell != null)
         {
             int index = this.gvList.CurrentCell.RowIndex;
             this.gvList.Columns["CurrentQty"].Visible = true;
             this.gvList.CurrentCell = this.gvList.Rows[index].Cells["CurrentQty"];
         }
         this.gvList.Columns["CurrentQty"].ReadOnly = false;
         //生产下线改为不能修改数量
         // this.gvList.Columns["CurrentQty"].ReadOnly =  this.resolver.ModuleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_OFFLINE;
     }
     else
     {
         this.gvList.Columns["Cartons"].Visible     = true;
         this.gvList.Columns["CurrentQty"].ReadOnly = true;
         this.gvHuList.ClearSelection();
         this.gvList.ClearSelection();
         this.tbBarCode.Text = string.Empty;
     }
     this.gvList = Utility.RenderDataGridViewBackColor(this.gvList);
     // this.lblMessage.Text = this.resolver.Result;
     this.gvHuList.ClearSelection();
 }
Exemplo n.º 2
0
        protected override void gvListDataBind()
        {
            this.gvHuList.Visible = false;
            this.gvList.Visible   = true;
            List <Transformer> transformerList = new List <Transformer>();

            if (this.resolver.Transformers != null)
            {
                foreach (Transformer transformer in this.resolver.Transformers)
                {
                    if (transformer.Qty != 0)
                    {
                        transformerList.Add(transformer);
                    }
                }
            }
            this.gvList.DataSource = new BindingList <Transformer>(transformerList);
            this.gvList            = Utility.RenderDataGridViewBackColor(this.gvList);
        }
Exemplo n.º 3
0
 protected virtual void gvList_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     this.gvList = Utility.RenderDataGridViewBackColor(this.gvList);
 }