日期:2014-05-17 浏览次数:20932 次
string datetime = dTyear.Text.ToString() + cbmonth.Text.ToString();
string create = "Create Table " + datetime + "(ID Int Primary Key,E_Name char(10),E_Title char(10),BasicWage char(10),OverTime_Pay char(10),LatePenalty char(10),Allowance char(10))";
string select = "select * from " + datetime.ToString() ;
ocm = new OleDbCommand(create, occ);
ocm1 = new OleDbCommand(select,occ);
int flag = ocm1.ExecuteNonQuery();
if (flag != 0)
{
ocm.ExecuteNonQuery();
occ.Close();
Form5 add = new Form5();
this.Hide();
add.Show();
return;
}
else
{
MessageBox.Show(cbmonth.Text.ToString() + "月的核算表已经建立!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
occ.Close();
return;
}