private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { Debug.WriteLine("cell end edit "); Debug.WriteLine(e.ToString()); Debug.WriteLine("------------------------"); DataGridView dg = (DataGridView)sender; //if (dg.CurrentCell. != null) Debug.WriteLine(dg.CurrentCell.EditedFormattedValue.ToString()); if (dg.CurrentCell.EditedFormattedValue != null) { Debug.WriteLine("edited : " + dg.CurrentCell.EditedFormattedValue.ToString()); } if (dg.CurrentCell.FormattedValueType != null) { Debug.WriteLine("FormattedValueType: " + dg.CurrentCell.FormattedValueType.ToString()); } if (dg.CurrentCell.FormattedValue != null) { Debug.WriteLine("FormattedValue: " + dg.CurrentCell.FormattedValue.ToString()); } if (dg.CurrentCell.Value != null) { Debug.WriteLine(" Value: " + dg.CurrentCell.Value); } }
private void listGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string content = e.ToString(); int column = e.ColumnIndex; int row = e.RowIndex; if (listGrid.Columns[column].Name == "Address") { string address1 = listGrid.Rows[row].Cells["Address1"].Value.ToString(); string address2 = listGrid.Rows[row].Cells["Address2"].Value.ToString(); string address3 = listGrid.Rows[row].Cells["Address3"].Value.ToString(); getDataFromServer(address1, address2, address3); } else { string id = listGrid.Rows[row].Cells["codegrid"].Value.ToString(); GlobalVariable.RowIDList.Clear(); for (int i = 0; i < listGrid.Rows.Count; i++) { GlobalVariable.RowIDList.Add(listGrid.Rows[i].Cells["codegrid"].Value.ToString()); } item selecteditem = manager.getitem(Convert.ToInt32(id)); string srt = JsonConvert.SerializeObject(selecteditem); ItemDetail detail = new ItemDetail(srt, "field"); detail.Show(); } }
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e) { string docNumStr = textBox_TableName.Text; string docTypeStr = textBox_ExternalRef.Text; string index1 = e.ToString(); string newtableName = textBox_TableName.Text + "_Details"; // DisplayDetailObject dispObj = new DisplayDetailObject(base.ident, newtableName, docTypeStr, docNumStr, index1); dispObj.Show(); }
private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e) { descuento = 0; suma = 0; total = 0; try { for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells[5].Value != null) { String celImportValue = dataGridView1.Rows[i].Cells[5].Value.ToString(); Regex regex = new Regex(@"[0-9]*[\.\,]?[.0-9]+"); if (ValidacionesUtils.ValidarNumeros(celImportValue)) { dataGridView1.Rows[i].Cells[5].Value = ""; } if (Decimal.TryParse(celImportValue, out decimal xt)) { suma = suma + xt; } } if (dataGridView1.Rows[i].Cells[2].Value != null) { Conexione repo = new Conexione(); con = repo.AbrirConexion(); try { Factura factura = repo.FacturaDeCliente(con, dataGridView1.Rows[i].Cells[2].Value.ToString()); if (dataGridView1.Rows[i].Cells[3].Value == null) { dataGridView1.Rows[i].Cells[3].Value = factura.idLocalidad; } /* if (dataGridView1.Rows[i].Cells[4].Value == null) * { * dataGridView1.Rows[i].Cells[4].Value = factura.matricula; * }*/ if (dataGridView1.Rows[i].Cells[5].Value == null) { dataGridView1.Rows[i].Cells[5].Value = factura.importe; } } catch (InvalidCastException er) { Console.WriteLine(e.ToString()); } } } txtSuma.Text = suma.ToString(); } catch (Exception ex) { } calcularTotal(); }
private void ribbonButton3_Click(object sender, EventArgs e) { try { con.connectDB.Open(); MySqlCommand cmd = new MySqlCommand(); cmd.CommandText = "truncate table entry"; cmd.Connection = con.connectDB; cmd.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show("Error:" + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { con.connectDB.Close(); entry.form1.load_data(); } }
private void dgvNhomsanpham_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvNhomsanpham.CurrentRow.Index; txtMansp.Text = dgvNhomsanpham.Rows[i].Cells[0].Value.ToString(); txtTennsp.Text = dgvNhomsanpham.Rows[i].Cells[1].Value.ToString(); } catch { e.ToString(); } }
private void dgvHoadonxuat_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvHoadonxuat.CurrentRow.Index; txtMahdx.Text = dgvHoadonxuat.Rows[i].Cells[0].Value.ToString(); cbManv.Text = dgvHoadonxuat.Rows[i].Cells[1].Value.ToString(); dtNgayxuat.Text = dgvHoadonxuat.Rows[i].Cells[2].Value.ToString(); } catch { e.ToString(); } }
private void grdGrillaEdit1_CellLeave(object sender, DataGridViewCellEventArgs e) { try { } catch (Exception ex) { Cursor.Current = Cursors.Default; ManejarError Err = new ManejarError(); Err.CargarError(ex, e.ToString(), ((Control)sender).Name, this.FindForm().Name); } }
private void dgvNhacungcap_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvNhacungcap.CurrentRow.Index; txtMancc.Text = dgvNhacungcap.Rows[i].Cells["Mancc"].Value.ToString(); txtTenncc.Text = dgvNhacungcap.Rows[i].Cells["Tenncc"].Value.ToString(); txtDiachi.Text = dgvNhacungcap.Rows[i].Cells["Diachi"].Value.ToString(); txtSdt.Text = dgvNhacungcap.Rows[i].Cells["Sodienthoai"].Value.ToString(); } catch { e.ToString(); } }
private void dgvSanpham_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvSanpham.CurrentRow.Index; txtMasp.Text = dgvSanpham.Rows[i].Cells["Masp"].Value.ToString(); cbTensp.Text = dgvSanpham.Rows[i].Cells["Tensp"].Value.ToString(); txtGia.Text = dgvSanpham.Rows[i].Cells["Giaban"].Value.ToString(); txtSoluong.Text = dgvSanpham.Rows[i].Cells["Soluong"].Value.ToString(); } catch { e.ToString(); } }
private void dgvHoadonnhap_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvHoadonnhap.CurrentRow.Index; cbMancc.Text = dgvHoadonnhap.Rows[i].Cells[2].Value.ToString(); txtMahdn.Text = dgvHoadonnhap.Rows[i].Cells[0].Value.ToString(); cbManv.Text = dgvHoadonnhap.Rows[i].Cells[1].Value.ToString(); txtTongtien.Text = dgvHoadonnhap.Rows[i].Cells[4].Value.ToString(); dtNgaynhap.Text = dgvHoadonnhap.Rows[i].Cells[3].Value.ToString(); } catch { e.ToString(); } }
private void dgvHoadonban_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvHoadonban.CurrentRow.Index; cbMakh.Text = dgvHoadonban.Rows[i].Cells["Makh"].Value.ToString(); txtMahdb.Text = dgvHoadonban.Rows[i].Cells["Mahdb"].Value.ToString(); cbManv.Text = dgvHoadonban.Rows[i].Cells["Manv"].Value.ToString(); txtTongtien.Text = dgvHoadonban.Rows[i].Cells["Tongtien"].Value.ToString(); dtNgayban.Text = dgvHoadonban.Rows[i].Cells["Ngayban"].Value.ToString(); } catch { e.ToString(); } }
private void dgvKhachhang_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvKhachhang.CurrentRow.Index; txtMakh.Text = dgvKhachhang.Rows[i].Cells["Makh"].Value.ToString(); txtTenkh.Text = dgvKhachhang.Rows[i].Cells["Tenkh"].Value.ToString(); txtGioitinh.Text = dgvKhachhang.Rows[i].Cells["Gioitinh"].Value.ToString(); txtDiachi.Text = dgvKhachhang.Rows[i].Cells["Diachi"].Value.ToString(); txtSdt.Text = dgvKhachhang.Rows[i].Cells["Sodienthoai"].Value.ToString(); } catch { e.ToString(); } }
private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { if (this.dataGridView1.Rows[e.RowIndex].Cells[0].Selected == true) { selectedaccount = (int)dataGridView1.Rows[e.RowIndex].Cells[1].Value;//存储所选账号到10000 } else { selectedaccount = 8888; } } catch { Console.WriteLine("异常{0}", e.ToString()); } }
private void dgvKho_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvKho.CurrentRow.Index; txtMasp.Text = dgvKho.Rows[i].Cells["Masp"].Value.ToString(); txtTensp.Text = dgvKho.Rows[i].Cells["Tensp"].Value.ToString(); txtGia.Text = dgvKho.Rows[i].Cells["Dongia"].Value.ToString(); txtSoluong.Text = dgvKho.Rows[i].Cells["Soluong"].Value.ToString(); txtLoai.Text = dgvKho.Rows[i].Cells["Loai"].Value.ToString(); } catch { e.ToString(); } }
private void dgvHoadonban_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvHoadonban.CurrentRow.Index; cbMasp.Text = dgvHoadonban.Rows[i].Cells["Masp"].Value.ToString(); txtMahdb.Text = dgvHoadonban.Rows[i].Cells["Mahdb"].Value.ToString(); txtDongia.Text = dgvHoadonban.Rows[i].Cells["Dongia"].Value.ToString(); txtThanhtien.Text = dgvHoadonban.Rows[i].Cells["Thanhtien"].Value.ToString(); txtSoluong.Text = dgvHoadonban.Rows[i].Cells["Soluong"].Value.ToString(); txtMacthdb.Text = dgvHoadonban.Rows[i].Cells["Macthdb"].Value.ToString(); } catch { e.ToString(); } }
private void dgvHoadonnhap_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvHoadonnhap.CurrentRow.Index; cbMasp.Text = dgvHoadonnhap.Rows[i].Cells[2].Value.ToString(); txtMahdn.Text = dgvHoadonnhap.Rows[i].Cells[1].Value.ToString(); txtDongia.Text = dgvHoadonnhap.Rows[i].Cells[4].Value.ToString(); txtThanhtien.Text = dgvHoadonnhap.Rows[i].Cells[5].Value.ToString(); txtSoluong.Text = dgvHoadonnhap.Rows[i].Cells[3].Value.ToString(); txtMacthdn.Text = dgvHoadonnhap.Rows[i].Cells[0].Value.ToString(); } catch { e.ToString(); } }
private void dtgTheLoai_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dtgTheLoai.CurrentRow.Index; txtTenTheLoai.Text = dtgTheLoai.Rows[i].Cells[0].Value.ToString(); txtMaTheLoai.Text = dtgTheLoai.Rows[i].Cells[1].Value.ToString(); txtMaTheLoai.Enabled = false; btnEdit.Enabled = true; btnDelete.Enabled = true; btnAdd.Enabled = false; } catch { e.ToString(); } }
private void dgvNhanvien_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dgvNhanvien.CurrentRow.Index; txtManv.Text = dgvNhanvien.Rows[i].Cells["Manv"].Value.ToString(); txtMatkhau.Text = dgvNhanvien.Rows[i].Cells["Matkhau"].Value.ToString(); txtTennv.Text = dgvNhanvien.Rows[i].Cells["Tennv"].Value.ToString(); txtGioitinh.Text = dgvNhanvien.Rows[i].Cells["Gioitinh"].Value.ToString(); txtDiachi.Text = dgvNhanvien.Rows[i].Cells["Diachi"].Value.ToString(); txtSdt.Text = dgvNhanvien.Rows[i].Cells["Sodienthoai"].Value.ToString(); cbChucvu.Text = dgvNhanvien.Rows[i].Cells["Chucvu"].Value.ToString(); } catch { e.ToString(); } }
private void dtgNXB_CellClick(object sender, DataGridViewCellEventArgs e) { try { int i; i = dtgNXB.CurrentRow.Index; txtMaNXB.Text = dtgNXB.Rows[i].Cells[0].Value.ToString(); txtTenNXB.Text = dtgNXB.Rows[i].Cells[1].Value.ToString(); txtSDT.Text = dtgNXB.Rows[i].Cells[2].Value.ToString(); txtDiaChi.Text = dtgNXB.Rows[i].Cells[3].Value.ToString(); txtMaNXB.Enabled = false; btnEdit.Enabled = true; btnDelete.Enabled = true; btnAdd.Enabled = false; } catch { e.ToString(); } }
private void listGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string content = e.ToString(); int column = e.ColumnIndex; int row = e.RowIndex; string id = listGrid.Rows[row].Cells["codegrid"].Value.ToString(); GlobalVariable.RowIDList.Clear(); for (int i = 0; i < listGrid.Rows.Count; i++) { GlobalVariable.RowIDList.Add(listGrid.Rows[i].Cells["codegrid"].Value.ToString()); } item selecteditem = manager.getitem(Convert.ToInt32(id)); string srt = JsonConvert.SerializeObject(selecteditem); ItemDetail detail = new ItemDetail(srt, "archive"); detail.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { btnRegister.Enabled = false; try { //initialize data grid view selected cell index int i; i = dataGridView1.SelectedCells[0].RowIndex; txtAdmissionNo.Text = dataGridView1.Rows[i].Cells[0].Value.ToString(); txtName.Text = dataGridView1.Rows[i].Cells[1].Value.ToString(); value = dataGridView1.Rows[i].Cells[2].Value.ToString(); if (value == rdMale.Text) { rdMale.Checked = true; } else { rdFemale.Checked = true; } txtAddress.Text = dataGridView1.Rows[i].Cells[3].Value.ToString(); txtContactNo.Text = dataGridView1.Rows[i].Cells[4].Value.ToString(); lblStatus.Text = dataGridView1.Rows[i].Cells[5].Value.ToString(); lblStatus.Visible = true; if (lblStatus.Text == "Active") { btnLocked.Enabled = true; } else if (lblStatus.Text == "Inactive") { btnUnlock.Enabled = true; } } catch { MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { //initialize data grid view selected cell index int i; i = dataGridView1.SelectedCells[0].RowIndex; cmbLocation.SelectedValue = dataGridView1.Rows[i].Cells[0].Value.ToString(); cmbCategory.SelectedValue = dataGridView1.Rows[i].Cells[1].Value.ToString(); txtItemID.Text = dataGridView1.Rows[i].Cells[2].Value.ToString(); txtName.Text = dataGridView1.Rows[i].Cells[3].Value.ToString(); cmbStatus.SelectedValue = dataGridView1.Rows[i].Cells[4].Value.ToString(); txtRemarks.Text = dataGridView1.Rows[i].Cells[5].Value.ToString(); cmbActivity.SelectedValue = dataGridView1.Rows[i].Cells[6].Value.ToString(); } catch { MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dgv제품_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { try { DataTable dt33 = F_FLOW_CHK_RST(dgv제품.Rows[e.RowIndex].Cells[0].Value.ToString()); dataFlowChkGrid.Rows.Clear(); for (int i = 0; i < dt33.Rows.Count; i++) { dataFlowChkGrid.Rows.Add(); dataFlowChkGrid.Rows[i].Cells["CHK_NM"].Value = dt33.Rows[i]["CHK_NM"].ToString(); dataFlowChkGrid.Rows[i].Cells["CHK_ORD"].Value = dt33.Rows[i]["CHK_ORD"].ToString(); dataFlowChkGrid.Rows[i].Cells["항목수량"].Value = dt33.Rows[i]["CHK_VALUE"].ToString(); dataFlowChkGrid.Rows[i].Cells["항목내용"].Value = dt33.Rows[i]["COMMENT"].ToString();; dataFlowChkGrid.Rows[i].Cells["결과"].Value = dt33.Rows[i]["s_code_nm"].ToString(); } } catch { Debug.WriteLine(e.ToString()); } } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { string value = ""; //initialize data grid view selected cell index int i; i = dataGridView1.SelectedCells[0].RowIndex; txtAdmissionNo.Text = dataGridView1.Rows[i].Cells[0].Value.ToString(); dtDateOfAdmission.Text = dataGridView1.Rows[i].Cells[1].Value.ToString(); txtName.Text = dataGridView1.Rows[i].Cells[2].Value.ToString(); value = dataGridView1.Rows[i].Cells[3].Value.ToString(); if (value == rdMale.Text) { rdMale.Checked = true; } else { rdFemale.Checked = true; } dtDob.Text = dataGridView1.Rows[i].Cells[4].Value.ToString(); txtAddress.Text = dataGridView1.Rows[i].Cells[5].Value.ToString(); txtCity.Text = dataGridView1.Rows[i].Cells[6].Value.ToString(); txtNic.Text = dataGridView1.Rows[i].Cells[7].Value.ToString(); txtContactNo.Text = dataGridView1.Rows[i].Cells[8].Value.ToString(); txtNationality.Text = dataGridView1.Rows[i].Cells[9].Value.ToString(); cmbReligion.Text = dataGridView1.Rows[i].Cells[10].Value.ToString(); txtGuardianName.Text = dataGridView1.Rows[i].Cells[11].Value.ToString(); txtGuardianContactNo.Text = dataGridView1.Rows[i].Cells[12].Value.ToString(); } catch { MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dgv_Facture_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgv_Facture.SelectedRows.Count == 1) { DateTime dt = DateTime.Parse(dgv_Facture.CurrentRow.Cells[3].Value.ToString()); string dtn = dt.Day + "_" + dt.Month + "_" + dt.Year; string fileName = "\\" + "No" + dgv_Facture.CurrentRow.Cells[0].Value.ToString() + "_" + dtn + ".pdf"; AjtVente mdVnt = new AjtVente(int.Parse(dgv_Facture.CurrentRow.Cells[0].Value.ToString()), this, fileName, FrmAcc); mdVnt.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("هناك خطأ أثناء العملية المرجوا إعادة المحاولة"); string Err = "[" + DateTime.Now + "] [Exception] __ [Form :" + this.Name + " ; Button: " + sender.ToString() + " ; Event: " + e.ToString() + "] __ ExceptionMessage : " + ex.Message; Acceuil.WriteLog(Err); } }
private void dgv제품_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { //DataTable dt = fn_Work_Detail_List(dgv제품.Rows[e.RowIndex].Cells["LOT넘버"].Value.ToString()); //workRmGrid.Rows.Clear(); //if (dt.Rows.Count > 0) //{ // for (int i = 0; i < dt.Rows.Count; i++) // { // workRmGrid.Rows.Add(); // workRmGrid.Rows[i].Cells["작업일자"].Value = dt.Rows[i]["w_inst_date"].ToString(); // workRmGrid.Rows[i].Cells["제품명"].Value = dt.Rows[i]["ITEM_NM"].ToString(); // workRmGrid.Rows[i].Cells["원자재명"].Value = dt.Rows[i]["RAW_MAT_NM"].ToString(); // workRmGrid.Rows[i].Cells["소요량"].Value = dt.Rows[i]["SOYO_AMT"].ToString().Split('.')[0]; // workRmGrid.Rows[i].Cells["총수량"].Value = dt.Rows[i]["TOTAL_AMT"].ToString().Split('.')[0]; // workRmGrid.Rows[i].Cells["거래처"].Value = dt.Rows[i]["CUST_NM"].ToString(); // workRmGrid.Rows[i].Cells["작업지시자"].Value = dt.Rows[i]["STAFF_NM"].ToString(); // workRmGrid.Rows[i].Cells["설비"].Value = dt.Rows[i]["LINE_NM"].ToString(); // } //} //else //{ //} this.wConst.mergeCells(this.workRmGrid, 1); try { dgv공정.Rows.Clear(); DataTable dt2 = fn공정(dgv제품.Rows[e.RowIndex].Cells[0].Value.ToString()); for (int i = 0; i < dt2.Rows.Count; i++) { dgv공정.Rows.Add(); dgv공정.Rows[i].Cells["단계"].Value = dt2.Rows[i]["단계"].ToString(); dgv공정.Rows[i].Cells["공정명"].Value = dt2.Rows[i]["공정"].ToString(); dgv공정.Rows[i].Cells["불량명"].Value = dt2.Rows[i]["불량명"].ToString(); dgv공정.Rows[i].Cells["불량수"].Value = dt2.Rows[i]["불량수"].ToString(); dgv공정.Rows[i].Cells["생산량"].Value = dt2.Rows[i]["f_sub_amt"].ToString(); if (dt2.Rows[i]["불량명"].ToString() != "정상") { dgv공정.Rows[i].Cells["불량명"].Style.ForeColor = Color.Red; } } //DataTable dt2 = fn_poor(dgv제품.Rows[e.RowIndex].Cells[1].Value.ToString()); //txtLotNo.Text = dt2.Rows[0]["LOT_NO"].ToString(); //txt일자.Text = dt2.Rows[0]["F_SUB_DATE"].ToString(); //conTextBox[] textbox = new conTextBox[dt2.Rows.Count]; //conTextBox[] textbox2 = new conTextBox[dt2.Rows.Count]; //for (int i = 0; i < dt2.Rows.Count; i++) //{ // textbox[i].Text = dt2.Rows[i]["POOR_NM"].ToString(); // textbox2[i].Text = dt2.Rows[i]["POOR_AMT"].ToString(); // textbox[i].Size = new Size(30, 20); // textbox2[i].Size = new Size(30, 20); // textbox[i].Location = new Point(0, 20 * i); // textbox2[i].Location = new Point(30, 20 * i); // panel3.Controls.Add(textbox[i]); // panel3.Controls.Add(textbox2[i]); //} } catch { } } if (e.RowIndex > -1) { try { DataTable dt33 = 품질불량수량(dgv제품.Rows[e.RowIndex].Cells[0].Value.ToString()); dataChkGrid.Rows.Clear(); for (int i = 0; i < dt33.Rows.Count; i++) { dataChkGrid.Rows.Add(); dataChkGrid.Rows[i].Cells["CHK_NM"].Value = dt33.Rows[i]["CHK_NM"].ToString(); dataChkGrid.Rows[i].Cells["CHK_ORD"].Value = dt33.Rows[i]["CHK_ORD"].ToString(); dataChkGrid.Rows[i].Cells["항목수량"].Value = dt33.Rows[i]["CHK_VALUE"].ToString(); dataChkGrid.Rows[i].Cells["항목내용"].Value = dt33.Rows[i]["COMMENT"].ToString();; dataChkGrid.Rows[i].Cells["결과"].Value = dt33.Rows[i]["s_code_nm"].ToString(); } } catch { Debug.WriteLine(e.ToString()); } } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { MessageBox.Show(e.ToString()); }
private void dgv_AfficheProd_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgv_AfficheProd.SelectedRows.Count == 1) { MdfProduit frmMdf = new MdfProduit(int.Parse(dgv_AfficheProd.CurrentRow.Cells[0].Value.ToString()), this); frmMdf.ShowDialog(); } } catch (Exception ex) { MessageBox.Show("هناك خطأ أثناء العملية المرجوا إعادة المحاولة"); string Err = "[" + DateTime.Now + "] [Exception] __ [Form :" + this.Name + " ; Button: " + sender.ToString() + " ; Event: " + e.ToString() + "] __ ExceptionMessage : " + ex.Message; Acceuil.WriteLog(Err); } }
private void gridProductos_CellValueChanged(object sender, DataGridViewCellEventArgs e) { string preciotx = String.Format("{0:0.00}", e.ToString()); preciotx = preciotx.Replace(".", ","); }