bool IsExists(string pre) {//判断是否存在收据编号前10位
cmmdString = string.Format("select count(*) from receipt_receiptNo_t where pk_nopre='{0}'",pre);
cmmd = new OracleCommand(cmmdString,conn);
conn.Open();
int count = Convert.ToInt32(cmmd.ExecuteScalar());
conn.Close();
if(count==0){
return false ;
}
return true ;
}
private void updateReceiptMax(string maxid,string pre) {//更新流水号的最大值
cmmdString = string.Format("update receipt_receiptNo_t set max='{0}'where pk_nopre='{1}'", maxid, pre);
cmmd = new OracleCommand(cmmdString,conn);
conn.Open();
int count = cmmd.ExecuteNonQuery();
conn.Close();
if(count>0){
MessageBox.Show("更新成功");
}
}