DataAccessLayer: public string REPEATED_NAME (Add_SupplierPL obj) { string str = "SELECT S_NAME FROM SUPPLIER WITH (NOLOCK) WHERE UNIT='" + obj.UNIT + "' AND COMPANY='"+ obj.COMPANY +"' AND S_NAME='" + obj.SUPPLIERNAME + "'"; obj.SUPPLIERNAME = SqlHelper.ExecuteScalar(SqlCon, CommandType.Text, str).ToString(); if(obj.SUPPLIERNAME=="") { return "0"; } else { return obj.SUPPLIERNAME; } }
obj.SUPPLIERNAME = "" + SqlHelper.ExecuteScalar(SqlCon, CommandType.Text, str);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)