示例#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]);
     }
 }