private void grdRapor_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) { if (grdRapor.Rows.Count > 0) { double topMiktar = 0.0; double toplamTutar = 0.0; double kar = 0.0; foreach (DataGridViewRow row in grdRapor.Rows) { if (row.Cells["grdMIKTAR"].Value.ToString() != "") { topMiktar += Convert.ToDouble(row.Cells["grdMIKTAR"].Value.ToString()); } if (row.Cells["grdTUTAR"].Value.ToString() != "") { toplamTutar += Convert.ToDouble(row.Cells["grdTUTAR"].Value.ToString()); } if (row.Cells["grdKAR"].Value.ToString() != "") { kar += Convert.ToDouble(row.Cells["grdKAR"].Value.ToString()); } } TOP_MIKTAR.SetDoubleData(topMiktar); TOPLAM_TUTAR.SetDoubleData(toplamTutar); KAR.SetDoubleData(kar); } }
private void grdRapor_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) { if (grdRapor.Rows.Count > 0) { double topMiktar = 0.0; double topAlis = 0.0; double topSatis = 0.0; foreach (DataGridViewRow row in grdRapor.Rows) { topMiktar += Convert.ToDouble(row.Cells["grdBAKIYE"].Value.ToString()); topSatis += Convert.ToDouble(row.Cells["grdTOPLAM_SATIS"].Value.ToString()); topAlis += Convert.ToDouble(row.Cells["grdTOPLAM_ALIS"].Value.ToString()); } ALIS_TOPLAM.SetDoubleData(topAlis); SATIS_TOPLAM.SetDoubleData(topSatis); TOP_MIKTAR.SetDoubleData(topMiktar); } }