예제 #1
0
파일: FrmDrugM.cs 프로젝트: 1907931256/jx
 private void DeleteDrugInfo()
 {
     foreach (DataGridViewRow selRow in dgv.SelectedRows)
     {
         int            drugId = Convert.ToInt32(Judgement.JudgeDBNullValue(selRow.Cells[DBConstDef.DRUG_ID].Value, EnumDef.ENUM_DATA_TYPE.DATA_TYPE_INTEGER));
         DbMaintainment operDb = new DbMaintainment();
         operDb.DeleteDrugInfo(drugId);
         DataRow[] selRows = ((DataTable)dgv.DataSource).Select(string.Format("{0}={1}", DBConstDef.DRUG_ID, drugId));
         if (selRows.Length > 0)
         {
             ((DataTable)dgv.DataSource).Rows.Remove(selRows[0]);
         }
     }
 }
예제 #2
0
파일: FrmDrugM.cs 프로젝트: CareyGit/jx
 private void DeleteDrugInfo()
 {
     foreach (DataGridViewRow selRow in dgv.SelectedRows)
     {
         int drugId = Convert.ToInt32(Judgement.JudgeDBNullValue(selRow.Cells[DBConstDef.DRUG_ID].Value, EnumDef.ENUM_DATA_TYPE.DATA_TYPE_INTEGER));
         DbMaintainment operDb = new DbMaintainment();
         operDb.DeleteDrugInfo(drugId);
         DataRow[] selRows = ((DataTable)dgv.DataSource).Select(string.Format("{0}={1}", DBConstDef.DRUG_ID, drugId));
         if (selRows.Length>0)
             ((DataTable)dgv.DataSource).Rows.Remove(selRows[0]);
     }
 }