62,254
社区成员
发帖
与我相关
我的任务
分享
public bool Judge(string M_FatherType,string M_Type,string Spec, string Color_Po_Id)
{
string connString = ConfigurationManager.AppSettings["SqlConnectionString"].ToString();
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand("select * from SB_Goods2 where M_FatherType='" + M_FatherType + "', M_Type='" + M_Type + "',Spec ='" + Spec + "' and Color_Po_Id='"+Color_Po_Id+"'", conn);
//string sql="select * from SB_Goods2 where M_FatherType='" + M_FatherType + "' M_Type='" + M_Type + "' Spec ='" + Spec + "' and Color_Po_Id='"+Color_Po_Id+"'";
SqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
{
return false;
}
else
{
return true;
}
conn.Close();
}
var bool=_AjaxDo("Judge",a)
if(bool=="true")
{
return true;
}
else
{
alert("有重复的保存,请重新确认!");
return false;
}