for (i = 0; i != sarray.Length(); i++)
{
if (SMS.Checked == true && recu2["psnMobilePhone"].ToString().Trim().Length > 0)
{
com_sms.CommandText = "insert into AQ_SMS(SmsID,psnMobilePhone,SmsContent,SmsSort) values(@SmsID,@psnMobilePhone,@SmsContent,@SmsSort)";
com_sms.Parameters.Clear();
com_sms.Parameters.AddWithValue("@SmsID", LiuShuiNO);
com_sms.Parameters.AddWithValue("@psnMobilePhone", recu2["psnMobilePhone"].ToString().Trim());
com_sms.Parameters.AddWithValue("@SmsContent", smsContent);
com_sms.Parameters.AddWithValue("@SmsSort");
}
}CS0149: 应输入方法名称
是我这个代码有问题嘛?怎么改?
{
if (SMS.Checked == true && recu2["psnMobilePhone"].ToString().Trim().Length > 0)
{
com_sms.CommandText = "insert into AQ_SMS(SmsID,psnMobilePhone,SmsContent,SmsSort) values(@SmsID,@psnMobilePhone,@SmsContent,@SmsSort)";
com_sms.Parameters.Clear();
com_sms.Parameters.AddWithValue("@SmsID", LiuShuiNO);
com_sms.Parameters.AddWithValue("@psnMobilePhone", recu2["psnMobilePhone"].ToString().Trim());
com_sms.Parameters.AddWithValue("@SmsContent", smsContent);
com_sms.Parameters.AddWithValue("@SmsSort");
}
}CS0149: 应输入方法名称
是我这个代码有问题嘛?怎么改?
解决方案 »
- 你能分清楚的术语之--函数、过程和方法
- C# winform 中SaveFileDialog和OpenFileDialog没有响应应,打不开?
- 如何在線程中使用 线程中使用 WebBrower 在線程中使用 webBrower得到的uri是 null
- 有没有办法用程序从外部触犯一个form的某个事件
- 在读取内存映射文件时怎么样才能准确得到字符的值?
- 设计器里面不能拖动控件了!
- 对路径"....文件"的访问被拒绝
- 请问这个radiobutton和这个button按钮是如何做的呢。要自定义控件吗
- 句柄的数据类型是什么,怎么定义的
- dataTable中取删除的行的信息
- 关于TreeView生成时的IndexOf值获取、传输的问题
- 获取XmlDocument的内容,转化为字符串
{
string LiuShuiNO = "";
string SmsContent = TextBox2.Text;
string strMobile = TextBox1.Text;//手机号码
Safety safety = new Safety();
int i;
char[] p = { ',' };
string[] sarray = strMobile.Split(p);
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["AqConn"].ToString();
SqlConnection con = new SqlConnection(connectionString);
con.Open();
SqlCommand com = new SqlCommand(); SqlCommand cmd = new SqlCommand("Pr_GetNewLiuShuiNO", con);
cmd.CommandType = CommandType.StoredProcedure;//指示Pr_GetNewLiuShuiNO为存储过程
SqlParameter my = new SqlParameter("@NewNO", SqlDbType.VarChar, 200);
my.Direction = ParameterDirection.Output;
cmd.Parameters.Add(my);
cmd.ExecuteNonQuery();//执行存储过程
com.Dispose();
LiuShuiNO = my.Value.ToString();
for (i = 0; i != sarray.Length(); i++)
{
safety.Pr_sdfs(SmsID, psnMobilePhone, SmsContent, SmsSort);
if (SMS.Checked == true && recu2["psnMobilePhone"].ToString().Trim().Length > 0)
{
com_sms.CommandText = "insert into AQ_SMS(SmsID,psnMobilePhone,SmsContent,SmsSort) values(@SmsID,@psnMobilePhone,@SmsContent,@SmsSort)";
com_sms.Parameters.Clear();
com_sms.Parameters.AddWithValue("@SmsID", LiuShuiNO);
com_sms.Parameters.AddWithValue("@psnMobilePhone", recu2["psnMobilePhone"].ToString().Trim());
com_sms.Parameters.AddWithValue("@SmsContent", smsContent);
com_sms.Parameters.AddWithValue("@SmsSort");
}
}
}
我的代码总共不到100行啊?到底什么原因帮帮我啊!!!
这一行红色的!!
数组有Length属性不是方法
ArrayList有Length方法