protected void addButton_Click(object sender, EventArgs e) { string symc = MCTextBox.Text.Trim(); //int syxs = Convert.ToInt32(SYXSTextBox.Text.Trim()); string syjj = SYJJTextBox.Text.Trim(); string sydt = SYRQTextBox.Text.Trim(); string kssj = sydt + " " + s1.SelectedValue + ":" + s2.SelectedValue; string jssj = sydt + " " + s3.SelectedValue + ":" + s4.SelectedValue; int sysid = Convert.ToInt32(syfjDDL.SelectedValue); Security sec = Session["sec"] as Security; string sqrid = sec.getUserCode(); dbModule dm = new dbModule(); int i = dm.addZzsjxm( symc , syjj , sqrid ,sysid,kssj ,jssj ); switch (i) { case 1://正常添加成功 messageLabel.Text = Resources.Resource.strAddNewSuccess; MCTextBox.Text = ""; //SYXSTextBox.Text = ""; SYJJTextBox.Text = ""; break; default://添加失败 messageLabel.Text = Resources.Resource.strAddNewFailed; break; } }