public int CreateRegionOnly(Region entity) { string sql = "insert into Region(code) values(@code) "; SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@code", SqlDbType.NVarChar, 50); param[0].Value = entity.Code; return(sqlHelperDao.Create(sql, param)); }
public int CreateCarrierOnly(Carrier entity) { string sql = "insert into Carrier(code,RefSupplier) values(@code,@RefSupplier) "; SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@code", SqlDbType.NVarChar, 50); param[0].Value = entity.Code; param[1] = new SqlParameter("@RefSupplier", SqlDbType.NVarChar, 50); param[1].Value = entity.ReferenceSupplier; return(sqlHelperDao.Create(sql, param)); }