Esempio n. 1
0
		private void DisplayStuPhoneNum(string stuID)
		{
			DataSet stuPhoneNum = new SMSInfoSystem().GetStuPhoneNum(stuID);
			gridControl2.DataSource = stuPhoneNum.Tables[0];
		}
Esempio n. 2
0
		private void simpleButton_EditTemp_Click(object sender, System.EventArgs e)
		{
			string name = textEdit1.Text.Trim();
			string content = memoEdit1.Text.Trim();
			
			if(name==string.Empty||content==string.Empty)
			{
				MessageBox.Show("模板名称跟内容必须填写.","系统信息!",
					MessageBoxButtons.OK,MessageBoxIcon.Information);
				return;
			}

			int flag = new SMSInfoSystem().InsertSMSTemplate(name,content);

			if(flag == -1)
			{
				MessageBox.Show("模板名称已存在,请更换后重试.","系统信息!",
					MessageBoxButtons.OK,MessageBoxIcon.Information);
			}
			else if(flag > 0 )
			{
				SMSTemp = new SMSInfoSystem().GetAllSMSTemp();
				gridControl1.DataSource = SMSTemp.Tables[0];
				textEdit1.Text = string.Empty;
				memoEdit1.Text = string.Empty;

				MessageBox.Show("模板保存成功.","系统信息!",
					MessageBoxButtons.OK,MessageBoxIcon.Information);
			}
		}