/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnCarDeduction_Click(object sender, EventArgs e) { GridCheckBoxXEditControl btn = sender as GridCheckBoxXEditControl; if (btn == null) { return; } FulUnLoadPlanDetail entity = btn.EditorCell.GridRow.DataItem as FulUnLoadPlanDetail; if (entity == null) { return; } if (btn.Checked && !this.CurrentList.Contains(entity)) { this.CurrentList.Add(entity); } else if (!btn.Checked && this.CurrentList.Contains(entity)) { this.CurrentList.Remove(entity); } }
private void superGridControl1_DataBindingComplete(object sender, DevComponents.DotNetBar.SuperGrid.GridDataBindingCompleteEventArgs e) { foreach (GridRow item in e.GridPanel.Rows) { try { FulUnLoadPlanDetail entity = item.DataItem as FulUnLoadPlanDetail; item.Cells["clmSupplierName"].Value = entity.TheLMYBDetail.TheLMYB.SupplierName; item.Cells["clmMineName"].Value = entity.TheLMYBDetail.TheLMYB.MineName; item.Cells["clmIsUnload"].Value = entity.IsUnLoad == "0" ? "未卸煤" : "已卸煤"; if (entity.IsUnLoad == "1") { item.Cells["operation"].Visible = false; } if (entity.TheLMYBDetail.TheLMYB.InFactoryType.Contains("入场")) { item.Cells["clmGrossTime"].Value = entity.TheLMYBDetail.TheBuyFuelTransport.GrossTime.ToString("yyyy-MM-dd HH:mm:ss"); item.Cells["clmGrossWeight"].Value = entity.TheLMYBDetail.TheBuyFuelTransport.GrossWeight.ToString("f2"); } } catch (Exception) { } } }